Skip to content

Commit a25fb27

Browse files
committed
minor #61249 [Serializer] Make data provider return type match its PHPDoc (MatTheCat)
This PR was merged into the 7.4 branch. Discussion ---------- [Serializer] Make data provider return type match its PHPDoc | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT Fix CI failures like https://github.com/symfony/symfony/actions/runs/16549261399/job/46801686089?pr=60568#step:7:27 Commits ------- 592254c [Serializer] Make data provider return type match its PHPDoc
2 parents 342063d + 592254c commit a25fb27

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

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

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ public function hasMetadataFor($value): bool
576576
/**
577577
* @return iterable<array{0: mixed, 1: bool}>
578578
*/
579-
public static function provideInvalidDiscriminatorTypes(): array
579+
public static function provideInvalidDiscriminatorTypes(): iterable
580580
{
581581
$toStringObject = new class {
582582
public function __toString()
@@ -585,14 +585,12 @@ public function __toString()
585585
}
586586
};
587587

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];
596594
}
597595

598596
public function testDenormalizeWithDiscriminatorMapUsesCorrectClassname()

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