[Serializer] add return type hints for ObjectPropertyListExtractorInterface

This commit is contained in:
David Maicher 2019-04-06 21:18:18 +02:00
parent 8a62892e42
commit 7628972285
2 changed files with 2 additions and 3 deletions

View File

@ -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);

View File

@ -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;
}