@@ -78,7 +78,7 @@ Configure property mapping
7878
7979Use the :class: `Symfony\\ Component\\ ObjectMapper\\ Attribute\\ Map ` attribute on properties to configure property mapping between
8080objects. ``target `` changes the target property, ``if `` allows to
81- conditionnally map properties::
81+ conditionally map properties::
8282
8383 // src/Dto/Source.php
8484 namespace App\Dto;
@@ -97,9 +97,9 @@ Transform mapped values
9797-----------------------
9898
9999Use ``transform `` to call a function or a
100- :class: `Symfony\C omponent\O bjectMapper\C allableInterface `::
100+ :class: `Symfony\\ Component\\ ObjectMapper\ \ CallableInterface `::
101101
102- // src/ObjectMapper/TransformNameCallable
102+ // src/ObjectMapper/TransformNameCallable.php
103103 namespace App\ObjectMapper;
104104
105105 use App\Dto\Source;
@@ -157,7 +157,8 @@ classes and it can be repeated::
157157
158158 #[Map(target: B::class, if: [Source::class, 'shouldMapToB'])]
159159 #[Map(target: C::class, if: [Source::class, 'shouldMapToC'])]
160- class Source {
160+ class Source
161+ {
161162 public static function shouldMapToB(mixed $value, object $object): bool
162163 {
163164 return false;
@@ -248,13 +249,12 @@ With this metadata usage, the mapping definition belongs to a mapper class::
248249 }
249250
250251
251- The custom metadata is injected inside our :class: `Symfony\\ Component\\ ObjectMapper\\ ObjectMapperInterface `::
252+ The custom metadata is injected into our :class: `Symfony\\ Component\\ ObjectMapper\\ ObjectMapperInterface `::
252253
253254 $a = new Source('a', 'b', 'c');
254255 $metadata = new MapStructMapperMetadataFactory(AToBMapper::class);
255256 $mapper = new ObjectMapper($metadata);
256257 $aToBMapper = new AToBMapper($mapper);
257258 $b = $aToBMapper->map($a);
258259
259-
260260.. _`MapStruct` : https://mapstruct.org/
0 commit comments