[Serializer] add return type hints for ObjectPropertyListExtractorInterface
This commit is contained in:
parent
8a62892e42
commit
7628972285
@ -30,7 +30,7 @@ class ObjectPropertyListExtractor implements ObjectPropertyListExtractorInterfac
|
|||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
public function getProperties($object, array $context = [])
|
public function getProperties($object, array $context = []): ?array
|
||||||
{
|
{
|
||||||
$class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object);
|
$class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object);
|
||||||
|
|
||||||
|
@ -20,9 +20,8 @@ interface ObjectPropertyListExtractorInterface
|
|||||||
* Gets the list of properties available for the given object.
|
* Gets the list of properties available for the given object.
|
||||||
*
|
*
|
||||||
* @param object $object
|
* @param object $object
|
||||||
* @param array $context
|
|
||||||
*
|
*
|
||||||
* @return string[]|null
|
* @return string[]|null
|
||||||
*/
|
*/
|
||||||
public function getProperties($object, array $context = []);
|
public function getProperties($object, array $context = []): ?array;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user