From 592254caeacff1ca95851a9b627a4dd4e624b8d5 Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Sun, 27 Jul 2025 10:55:41 +0200 Subject: [PATCH] [Serializer] Make data provider return type match its PHPDoc --- .../Normalizer/AbstractObjectNormalizerTest.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php index 70082ac8a1a0e..9df03948401ba 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php @@ -576,7 +576,7 @@ public function hasMetadataFor($value): bool /** * @return iterable */ - public static function provideInvalidDiscriminatorTypes(): array + public static function provideInvalidDiscriminatorTypes(): iterable { $toStringObject = new class { public function __toString() @@ -585,14 +585,12 @@ public function __toString() } }; - return [ - [[], true], - [new \stdClass(), true], - [123, true], - [false, true], - ['first', false], - [$toStringObject, false], - ]; + yield [[], true]; + yield [new \stdClass(), true]; + yield [123, true]; + yield [false, true]; + yield ['first', false]; + yield [$toStringObject, false]; } public function testDenormalizeWithDiscriminatorMapUsesCorrectClassname() 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