Skip to content

Commit db948b9

Browse files
committed
[Serializer][Validator] Fix static analysis report.
1 parent 5668c16 commit db948b9

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

src/Symfony/Component/Serializer/Normalizer/ConstraintViolationListNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public function normalize(mixed $object, ?string $format = null, array $context
6767
if (null !== $this->nameConverter) {
6868
$propertyPath = $this->nameConverter->normalize(
6969
$violation->getPropertyPath(),
70-
is_object($violation->getRoot()) ? get_class($violation->getRoot()) : null,
70+
\is_object($violation->getRoot()) ? \get_class($violation->getRoot()) : null,
7171
$format,
7272
$context
7373
);

src/Symfony/Component/Serializer/Tests/Normalizer/ConstraintViolationListNormalizerTest.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -55,23 +55,23 @@ public function testNormalize()
5555
'detail' => 'd: a
5656
4: 1',
5757
'violations' => [
58-
[
59-
'propertyPath' => 'd',
60-
'title' => 'a',
61-
'template' => 'b',
62-
'type' => 'urn:uuid:f',
63-
'parameters' => [
64-
'value' => 'foo',
65-
],
66-
],
67-
[
68-
'propertyPath' => '4',
69-
'title' => '1',
70-
'template' => '2',
71-
'type' => 'urn:uuid:6',
72-
'parameters' => [],
58+
[
59+
'propertyPath' => 'd',
60+
'title' => 'a',
61+
'template' => 'b',
62+
'type' => 'urn:uuid:f',
63+
'parameters' => [
64+
'value' => 'foo',
7365
],
7466
],
67+
[
68+
'propertyPath' => '4',
69+
'title' => '1',
70+
'template' => '2',
71+
'type' => 'urn:uuid:6',
72+
'parameters' => [],
73+
],
74+
],
7575
];
7676

7777
$this->assertEquals($expected, $this->normalizer->normalize($list));
@@ -140,7 +140,7 @@ public function testNormalizeWithMetadataAwareNameConverter()
140140
'title' => 'too long',
141141
'template' => 'a',
142142
'parameters' => [],
143-
]
143+
],
144144
],
145145
];
146146

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy