diff --git a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php index 8424a2ae730df..922094f8cb45a 100644 --- a/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php +++ b/src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php @@ -30,7 +30,7 @@ public function __construct(PropertyListExtractorInterface $propertyListExtracto /** * {@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 d422e79f82b84..1dd9b8b99a7d3 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; }