Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9afcc7b

Browse files
committed
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 #30904 😉 cc @joelwurtz Commits ------- 7628972 [Serializer] add return type hints for ObjectPropertyListExtractorInterface
2 parents f80df4c + 7628972 commit 9afcc7b

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(PropertyListExtractorInterface $propertyListExtracto
3030
/**
3131
* {@inheritdoc}
3232
*/
33-
public function getProperties($object, array $context = [])
33+
public function getProperties($object, array $context = []): ?array
3434
{
3535
$class = $this->objectClassResolver ? ($this->objectClassResolver)($object) : \get_class($object);
3636

src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ interface ObjectPropertyListExtractorInterface
2020
* Gets the list of properties available for the given object.
2121
*
2222
* @param object $object
23-
* @param array $context
2423
*
2524
* @return string[]|null
2625
*/
27-
public function getProperties($object, array $context = []);
26+
public function getProperties($object, array $context = []): ?array;
2827
}

0 commit comments

Comments
 (0)