8000 minor #39561 [Serializer] Fix DenormalizableInterface::denormalize() … · symfony/symfony@8f7a8d3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f7a8d3

Browse files
committed
minor #39561 [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock (jeroennoten)
This PR was merged into the 4.4 branch. Discussion ---------- [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | N.A. | License | MIT | Doc PR | N.A. DenormalizableInterface::denormalize() should not return anything, so the `@return` declaration should be remov 8000 ed. If you look at the usage in `CustomNormalizer::denormalize()`, it becomes clear that this method shouldn't return anything: ```php public function denormalize($data, $type, $format = null, array $context = []) { $object = $this->extractObjectToPopulate($type, $context) ?: new $type(); $object->denormalize($this->serializer, $data, $format, $context); return $object; } ``` Commits ------- 00c90ae [Serializer] Fix DenormalizableInterface::denormalize() return type declaration in docblock
2 parents c1b9323 + 00c90ae commit 8f7a8d3

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

src/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ interface DenormalizableInterface
3333
* @param string|null $format The format is optionally given to be able to denormalize
3434
* differently based on different input formats
3535
* @param array $context Options for denormalizing
36-
*
37-
* @return object|object[]
3836
*/
3937
public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []);
4038
}

0 commit comments

Comments
 (0)
0