Skip to content

Commit 3535b28

Browse files
Apply suggestions from code review
Co-authored-by: Nicolas Grekas <nicolas.grekas@gmail.com>
1 parent 60f0484 commit 3535b28

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/Symfony/Component/ObjectMapper/CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ CHANGELOG
55
---
66

77
* Add `ObjectMapperAwareInterface` to set the owning object mapper instance
8-
* Add a `MapCollection` transform that calls the Mapper over iterable
9-
properties
8+
* Add a `MapCollection` transform that calls the Mapper over iterable properties
109

1110
7.3
1211
---

src/Symfony/Component/ObjectMapper/Tests/Fixtures/TransformCollection/TransformCollectionC.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class TransformCollectionC
99
{
1010
public function __construct(
1111
#[Map(target: 'baz')]
12-
public string $bar
13-
) {}
12+
public string $bar,
13+
) {
14+
}
1415
}

src/Symfony/Component/ObjectMapper/Tests/Fixtures/TransformCollection/TransformCollectionD.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
class TransformCollectionD
66
{
77
public function __construct(
8-
public string $baz
9-
) {}
8+
public string $baz,
9+
) {
10+
}
1011
}

src/Symfony/Component/ObjectMapper/Transform/MapCollection.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
*/
2424
class MapCollection implements TransformCallableInterface
2525
{
26-
public function __construct(private ObjectMapperInterface $objectMapper = new ObjectMapper())
27-
{
26+
public function __construct(
27+
private ObjectMapperInterface $objectMapper = new ObjectMapper(),
28+
) {
2829
}
2930

3031
public function __invoke(mixed $value, object $source, ?object $target): mixed

0 commit comments

Comments
 (0)