diff --git a/Normalizer/AbstractNormalizer.php b/Normalizer/AbstractNormalizer.php index 143ce4a36..6805a2993 100644 --- a/Normalizer/AbstractNormalizer.php +++ b/Normalizer/AbstractNormalizer.php @@ -213,9 +213,9 @@ protected function handleCircularReference(object $object, string $format = null * @param string|object $classOrObject * @param bool $attributesAsString If false, return an array of {@link AttributeMetadataInterface} * - * @throws LogicException if the 'allow_extra_attributes' context variable is false and no class metadata factory is provided - * * @return string[]|AttributeMetadataInterface[]|bool + * + * @throws LogicException if the 'allow_extra_attributes' context variable is false and no class metadata factory is provided */ protected function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false) { diff --git a/Normalizer/BackedEnumNormalizer.php b/Normalizer/BackedEnumNormalizer.php index ad9fb807a..21fac3248 100644 --- a/Normalizer/BackedEnumNormalizer.php +++ b/Normalizer/BackedEnumNormalizer.php @@ -25,9 +25,9 @@ final class BackedEnumNormalizer implements NormalizerInterface, DenormalizerInt /** * {@inheritdoc} * - * @throws InvalidArgumentException - * * @return int|string + * + * @throws InvalidArgumentException */ public function normalize($object, string $format = null, array $context = []) { diff --git a/Normalizer/DataUriNormalizer.php b/Normalizer/DataUriNormalizer.php index 61f5f89ca..f338c49f8 100644 --- a/Normalizer/DataUriNormalizer.php +++ b/Normalizer/DataUriNormalizer.php @@ -88,10 +88,10 @@ public function supportsNormalization($data, string $format = null) * * @see https://gist.github.com/bgrins/6194623 * + * @return \SplFileInfo + * * @throws InvalidArgumentException * @throws NotNormalizableValueException - * - * @return \SplFileInfo */ public function denormalize($data, string $type, string $format = null, array $context = []) { diff --git a/Normalizer/DateIntervalNormalizer.php b/Normalizer/DateIntervalNormalizer.php index 7a02d1827..aef500b4d 100644 --- a/Normalizer/DateIntervalNormalizer.php +++ b/Normalizer/DateIntervalNormalizer.php @@ -36,9 +36,9 @@ public function __construct(array $defaultContext = []) /** * {@inheritdoc} * - * @throws InvalidArgumentException - * * @return string + * + * @throws InvalidArgumentException */ public function normalize($object, string $format = null, array $context = []) { @@ -68,10 +68,10 @@ public function hasCacheableSupportsMethod(): bool /** * {@inheritdoc} * + * @return \DateInterval + * * @throws InvalidArgumentException * @throws UnexpectedValueException - * - * @return \DateInterval */ public function denormalize($data, string $type, string $format = null, array $context = []) { diff --git a/Normalizer/DateTimeNormalizer.php b/Normalizer/DateTimeNormalizer.php index 2d46898f1..cbce0c529 100644 --- a/Normalizer/DateTimeNormalizer.php +++ b/Normalizer/DateTimeNormalizer.php @@ -50,9 +50,9 @@ public function setDefaultContext(array $defaultContext): void /** * {@inheritdoc} * - * @throws InvalidArgumentException - * * @return string + * + * @throws InvalidArgumentException */ public function normalize($object, string $format = null, array $context = []) { @@ -82,9 +82,9 @@ public function supportsNormalization($data, string $format = null) /** * {@inheritdoc} * - * @throws NotNormalizableValueException - * * @return \DateTimeInterface + * + * @throws NotNormalizableValueException */ public function denormalize($data, string $type, string $format = null, array $context = []) { diff --git a/Normalizer/DateTimeZoneNormalizer.php b/Normalizer/DateTimeZoneNormalizer.php index e7b6665d6..7d63b7609 100644 --- a/Normalizer/DateTimeZoneNormalizer.php +++ b/Normalizer/DateTimeZoneNormalizer.php @@ -25,9 +25,9 @@ class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterfa /** * {@inheritdoc} * - * @throws InvalidArgumentException - * * @return string + * + * @throws InvalidArgumentException */ public function normalize($object, string $format = null, array $context = []) { @@ -49,9 +49,9 @@ public function supportsNormalization($data, string $format = null) /** * {@inheritdoc} * - * @throws NotNormalizableValueException - * * @return \DateTimeZone + * + * @throws NotNormalizableValueException */ public function denormalize($data, string $type, string $format = null, array $context = []) { diff --git a/Tests/Annotation/ContextTest.php b/Tests/Annotation/ContextTest.php index 4a26c1b36..77c1edca0 100644 --- a/Tests/Annotation/ContextTest.php +++ b/Tests/Annotation/ContextTest.php @@ -41,6 +41,7 @@ public function testThrowsOnEmptyContext() /** * @group legacy + * * @dataProvider provideTestThrowsOnEmptyContextLegacyData */ public function testThrowsOnEmptyContextLegacy(callable $factory) @@ -60,6 +61,7 @@ public static function provideTestThrowsOnEmptyContextLegacyData(): iterable /** * @group legacy + * * @dataProvider provideTestThrowsOnNonArrayContextData */ public function testThrowsOnNonArrayContext(array $options) @@ -129,6 +131,7 @@ public function testAsContextArg() /** * @requires PHP 8 + * * @dataProvider provideValidInputs */ public function testValidInputs(callable $factory, string $expectedDump) @@ -216,6 +219,7 @@ function () { return new Context(...['context' => ['foo' => 'bar'], 'groups' => /** * @group legacy + * * @dataProvider provideValidLegacyInputs */ public function testValidLegacyInputs(callable $factory, string $expectedDump) diff --git a/Tests/Normalizer/Features/SkipUninitializedValuesTestTrait.php b/Tests/Normalizer/Features/SkipUninitializedValuesTestTrait.php index 038965730..0d17ba46d 100644 --- a/Tests/Normalizer/Features/SkipUninitializedValuesTestTrait.php +++ b/Tests/Normalizer/Features/SkipUninitializedValuesTestTrait.php @@ -23,6 +23,7 @@ abstract protected function getNormalizerForSkipUninitializedValues(): Normalize /** * @requires PHP 7.4 + * * @dataProvider skipUninitializedValuesFlagProvider */ public function testSkipUninitializedValues(array $context)