File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
src/Symfony/Component/Serializer/Tests/Normalizer Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ public function hasMetadataFor($value): bool
576
576
/**
577
577
* @return iterable<array{0: mixed, 1: bool}>
578
578
*/
579
- public static function provideInvalidDiscriminatorTypes (): array
579
+ public static function provideInvalidDiscriminatorTypes (): iterable
580
580
{
581
581
$ toStringObject = new class {
582
582
public function __toString ()
@@ -585,14 +585,12 @@ public function __toString()
585
585
}
586
586
};
587
587
588
- return [
589
- [[], true ],
590
- [new \stdClass (), true ],
591
- [123 , true ],
592
- [false , true ],
593
- ['first ' , false ],
594
- [$ toStringObject , false ],
595
- ];
588
+ yield [[], true ];
589
+ yield [new \stdClass (), true ];
590
+ yield [123 , true ];
591
+ yield [false , true ];
592
+ yield ['first ' , false ];
593
+ yield [$ toStringObject , false ];
596
594
}
597
595
598
596
public function testDenormalizeWithDiscriminatorMapUsesCorrectClassname ()
You can’t perform that action at this time.
0 commit comments