Skip to content

Commit b419fa6

Browse files
committed
ok
1 parent 4111512 commit b419fa6

File tree

3 files changed

+5
-21
lines changed

3 files changed

+5
-21
lines changed

phpstan.neon.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,3 +173,7 @@ parameters:
173173
identifier: method.notFound
174174
paths:
175175
- tests/Functional/JsonStreamerTest.php
176+
-
177+
identifier: method.notFound
178+
paths:
179+
- src/Serializer/Mapping/Loader/PropertyMetadataLoader.php

src/Hydra/Tests/Serializer/ConstraintViolationNormalizerTest.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,9 @@ public static function nameConverterAndPayloadFieldsProvider(): iterable
8888
],
8989
];
9090

91-
$advancedNameConverterFactory = function (self $that) {
92-
$advancedNameConverterProphecy = $that->prophesize(NameConverterInterface::class);
93-
$advancedNameConverterProphecy->normalize(Argument::cetera())->will(fn ($args): string => '_'.$args[0]);
94-
95-
return $advancedNameConverterProphecy->reveal();
96-
};
97-
9891
$nameConverterFactory = function (self $that) {
9992
$nameConverterProphecy = $that->prophesize(NameConverterInterface::class);
100-
$nameConverterProphecy->normalize(Argument::type('string'))->will(fn ($args): string => '_'.$args[0]);
93+
$nameConverterProphecy->normalize(Argument::cetera)->will(fn ($args): string => '_'.$args[0]);
10194

10295
return $nameConverterProphecy->reveal();
10396
};
@@ -106,21 +99,18 @@ public static function nameConverterAndPayloadFieldsProvider(): iterable
10699

107100
$expected = $nameConverterBasedExpectation;
108101
$expected[0]['payload'] = ['severity' => 'warning'];
109-
yield [$advancedNameConverterFactory, ['severity', 'anotherField1'], $expected];
110102
yield [$nameConverterFactory, ['severity', 'anotherField1'], $expected];
111103
$expected = $basicExpectation;
112104
$expected[0]['payload'] = ['severity' => 'warning'];
113105
yield [$nullNameConverterFactory, ['severity', 'anotherField1'], $expected];
114106

115107
$expected = $nameConverterBasedExpectation;
116108
$expected[0]['payload'] = ['severity' => 'warning', 'anotherField2' => 'aValue'];
117-
yield [$advancedNameConverterFactory, null, $expected];
118109
yield [$nameConverterFactory, null, $expected];
119110
$expected = $basicExpectation;
120111
$expected[0]['payload'] = ['severity' => 'warning', 'anotherField2' => 'aValue'];
121112
yield [$nullNameConverterFactory, null, $expected];
122113

123-
yield [$advancedNameConverterFactory, [], $nameConverterBasedExpectation];
124114
yield [$nameConverterFactory, [], $nameConverterBasedExpectation];
125115
yield [$nullNameConverterFactory, [], $basicExpectation];
126116
}

tests/Problem/Serializer/ConstraintViolationNormalizerTest.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,6 @@ public static function nameConverterProvider(): iterable
8686
};
8787
yield [$nameConverterFactory, $expected];
8888

89-
$nameConverterFactory = function (self $that): NameConverterInterface {
90-
$nameConverterProphecy = $that->prophesize(NameConverterInterface::class);
91-
$nameConverterProphecy->normalize(Argument::cetera())->will(
92-
fn ($args) => '_'.$args[0]
93-
);
94-
95-
return $nameConverterProphecy->reveal();
96-
};
97-
yield [$nameConverterFactory, $expected];
98-
9989
$expected = [
10090
[
10191
'propertyPath' => 'd',

0 commit comments

Comments
 (0)