Skip to content

Commit

Permalink
CS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Feb 16, 2023
1 parent 5e325f3 commit 1fd00f1
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Normalizer/AbstractNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 2 additions & 2 deletions Normalizer/BackedEnumNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
4 changes: 2 additions & 2 deletions Normalizer/DataUriNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down
8 changes: 4 additions & 4 deletions Normalizer/DateIntervalNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down Expand Up @@ -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 = [])
{
Expand Down
8 changes: 4 additions & 4 deletions Normalizer/DateTimeNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand Down Expand Up @@ -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 = [])
{
Expand Down
8 changes: 4 additions & 4 deletions Normalizer/DateTimeZoneNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [])
{
Expand All @@ -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 = [])
{
Expand Down
4 changes: 4 additions & 0 deletions Tests/Annotation/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public function testThrowsOnEmptyContext()

/**
* @group legacy
*
* @dataProvider provideTestThrowsOnEmptyContextLegacyData
*/
public function testThrowsOnEmptyContextLegacy(callable $factory)
Expand All @@ -60,6 +61,7 @@ public static function provideTestThrowsOnEmptyContextLegacyData(): iterable

/**
* @group legacy
*
* @dataProvider provideTestThrowsOnNonArrayContextData
*/
public function testThrowsOnNonArrayContext(array $options)
Expand Down Expand Up @@ -129,6 +131,7 @@ public function testAsContextArg()

/**
* @requires PHP 8
*
* @dataProvider provideValidInputs
*/
public function testValidInputs(callable $factory, string $expectedDump)
Expand Down Expand Up @@ -216,6 +219,7 @@ function () { return new Context(...['context' => ['foo' => 'bar'], 'groups' =>

/**
* @group legacy
*
* @dataProvider provideValidLegacyInputs
*/
public function testValidLegacyInputs(callable $factory, string $expectedDump)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ abstract protected function getNormalizerForSkipUninitializedValues(): Normalize

/**
* @requires PHP 7.4
*
* @dataProvider skipUninitializedValuesFlagProvider
*/
public function testSkipUninitializedValues(array $context)
Expand Down

0 comments on commit 1fd00f1

Please sign in to comment.