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

Skip to content

Commit fb161ec

Browse files
committed
minor #39170 Improve return value for phpdoc of Normalizer (VincentLanglet)
This PR was merged into the 4.4 branch. Discussion ---------- Improve return value for phpdoc of Normalizer | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | Phpdoc | New feature? | no | Deprecations? | no | License | MIT The inheritdoc return type is too large. The return type type can be more precise for lot of Normalizer. Commits ------- f2713d6 Improve return phpdoc for Normalizer
2 parents 4c378d4 + f2713d6 commit fb161ec

7 files changed

+22
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class ArrayDenormalizer implements ContextAwareDenormalizerInterface, Serializer
3535
* {@inheritdoc}
3636
*
3737
* @throws NotNormalizableValueException
38+
*
39+
* @return array
3840
*/
3941
public function denormalize($data, $type, $format = null, array $context = [])
4042
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ public function __construct($defaultContext = [], NameConverterInterface $nameCo
4040

4141
/**
4242
* {@inheritdoc}
43+
*
44+
* @return array
4345
*/
4446
public function normalize($object, $format = null, array $context = [])
4547
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function __construct($mimeTypeGuesser = null)
6161

6262
/**
6363
* {@inheritdoc}
64+
*
65+
* @return string
6466
*/
6567
public function normalize($object, $format = null, array $context = [])
6668
{
@@ -102,6 +104,8 @@ public function supportsNormalization($data, $format = null)
102104
*
103105
* @throws InvalidArgumentException
104106
* @throws NotNormalizableValueException
107+
*
108+
* @return \SplFileInfo
105109
*/
106110
public function denormalize($data, $type, $format = null, array $context = [])
107111
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ public function __construct($defaultContext = [])
4646
* {@inheritdoc}
4747
*
4848
* @throws InvalidArgumentException
49+
*
50+
* @return string
4951
*/
5052
public function normalize($object, $format = null, array $context = [])
5153
{
@@ -77,6 +79,8 @@ public function hasCacheableSupportsMethod(): bool
7779
*
7880
* @throws InvalidArgumentException
7981
* @throws UnexpectedValueException
82+
*
83+
* @return \DateInterval
8084
*/
8185
public function denormalize($data, $type, $format = null, array $context = [])
8286
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ public function __construct($defaultContext = [], \DateTimeZone $timezone = null
5757
* {@inheritdoc}
5858
*
5959
* @throws InvalidArgumentException
60+
*
61+
* @return string
6062
*/
6163
public function normalize($object, $format = null, array $context = [])
6264
{
@@ -87,6 +89,8 @@ public function supportsNormalization($data, $format = null)
8789
* {@inheritdoc}
8890
*
8991
* @throws NotNormalizableValueException
92+
*
93+
* @return \DateTimeInterface
9094
*/
9195
public function denormalize($data, $type, $format = null, array $context = [])
9296
{

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterfa
2525
* {@inheritdoc}
2626
*
2727
* @throws InvalidArgumentException
28+
*
29+
* @return string
2830
*/
2931
public function normalize($object, $format = null, array $context = [])
3032
{
@@ -47,6 +49,8 @@ public function supportsNormalization($data, $format = null)
4749
* {@inheritdoc}
4850
*
4951
* @throws NotNormalizableValueException
52+
*
53+
* @return \DateTimeZone
5054
*/
5155
public function denormalize($data, $type, $format = null, array $context = [])
5256
{

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ public function __construct(bool $debug = false, array $defaultContext = [])
3737

3838
/**
3939
* {@inheritdoc}
40+
*
41+
* @return array
4042
*/
4143
public function normalize($exception, $format = null, array $context = [])
4244
{

0 commit comments

Comments
 (0)