Skip to content

Commit d8ee5ae

Browse files
Merge branch '6.4' into 7.0
* 6.4: [Serializer] Fix anonymous test class
2 parents b4c9fe5 + 8abe7fe commit d8ee5ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,7 @@ public function testNormalizeWithIgnoreAttributeAndPrivateProperties()
848848
public function testNormalizeBasedOnAllowedAttributes()
849849
{
850850
$normalizer = new class() extends AbstractObjectNormalizer {
851-
protected function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false)
851+
protected function getAllowedAttributes($classOrObject, array $context, bool $attributesAsString = false): array
852852
{
853853
return ['foo'];
854854
}
@@ -858,12 +858,12 @@ protected function extractAttributes(object $object, string $format = null, arra
858858
return [];
859859
}
860860

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

866-
protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = [])
866+
protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = []): void
867867
{
868868
}
869869
};

0 commit comments

Comments
 (0)