Skip to content

Commit 592254c

Browse files
committed
[Serializer] Make data provider return type match its PHPDoc
1 parent 342063d commit 592254c

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