diff --git a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php index 8424a2ae73..922094f8cb 100644 --- a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php +++ b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php @@ -30,7 +30,7 @@ class ObjectPropertyListExtractor implements ObjectPropertyListExtractorInterfac /** * {@inheritdoc} */ - public function getProperties($object, array $context = []) + public function getProperties($object, array $context = []): ?array { $class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object); diff --git a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php index d422e79f82..1dd9b8b99a 100644 --- a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php +++ b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php @@ -20,9 +20,8 @@ interface ObjectPropertyListExtractorInterface * Gets the list of properties available for the given object. * * @param object $object - * @param array $context * * @return string[]|null */ - public function getProperties($object, array $context = []); + public function getProperties($object, array $context = []): ?array; }