Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9afcc7b

Browse filesBrowse 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
Copy full SHA for 9afcc7b

File tree

Expand file treeCollapse file tree

2 files changed

+2
-3
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-3
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractor.php
+1-1Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/Serializer/Extractor/ObjectPropertyListExtractorInterface.php
+1-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.