Skip to content

Commit

Permalink
Merge branch '6.4' into 7.0
Browse files Browse the repository at this point in the history
* 6.4:
  [Serializer] Fix anonymous test class
  • Loading branch information
nicolas-grekas committed Nov 29, 2023
2 parents 84a415c + 475cc93 commit ac73ab2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/Normalizer/AbstractObjectNormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ public function testNormalizeWithIgnoreAttributeAndPrivateProperties()
public function testNormalizeBasedOnAllowedAttributes()
{
$normalizer = new class() extends AbstractObjectNormalizer {
protected function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false)
protected function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false): array
{
return ['foo'];
}
Expand All @@ -858,12 +858,12 @@ protected function extractAttributes(object $object, string $format = null, arra
return [];
}

protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = [])
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = []): mixed
{
return $object->$attribute;
}

protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = [])
protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []): void
{
}
};
Expand Down

0 comments on commit ac73ab2

Please sign in to comment.