Skip to content

Commit

Permalink
[Serializer] Fix anonymous test class
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Nov 29, 2023
1 parent 4c832cc commit 868bca1
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 @@ -855,7 +855,7 @@ public function testNormalizeWithIgnoreAnnotationAndPrivateProperties()
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 @@ -865,12 +865,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 868bca1

Please sign in to comment.