minor #30934 [Serializer] add return type hints for ObjectPropertyListExtractorInterface (dmaicher)
This PR was merged into the 4.3-dev branch.
Discussion
----------
[Serializer] add return type hints for ObjectPropertyListExtractorInterface
| Q | A
| ------------- | ---
| Branch? | master
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Fixed tickets | -
| License | MIT
| Doc PR | -
@nicolas-grekas as just discussed here the type-hint + phpdoc cleanup as follow-up for https://github.com/symfony/symfony/pull/30904 😉
cc @joelwurtz
Commits
-------
7628972285
[Serializer] add return type hints for ObjectPropertyListExtractorInterface
This commit is contained in:
commit
9afcc7b833
@ -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