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
-------

f2713d6580 Improve return phpdoc for Normalizer
This commit is contained in:
Robin Chalas 2020-11-25 13:22:39 +01:00
commit fb161ec0ee
7 changed files with 22 additions and 0 deletions

View File

@ -35,6 +35,8 @@ class ArrayDenormalizer implements ContextAwareDenormalizerInterface, Serializer
* {@inheritdoc}
*
* @throws NotNormalizableValueException
*
* @return array
*/
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@ -40,6 +40,8 @@ class ConstraintViolationListNormalizer implements NormalizerInterface, Cacheabl
/**
* {@inheritdoc}
*
* @return array
*/
public function normalize($object, $format = null, array $context = [])
{

View File

@ -61,6 +61,8 @@ class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface, C
/**
* {@inheritdoc}
*
* @return string
*/
public function normalize($object, $format = null, array $context = [])
{
@ -102,6 +104,8 @@ class DataUriNormalizer implements NormalizerInterface, DenormalizerInterface, C
*
* @throws InvalidArgumentException
* @throws NotNormalizableValueException
*
* @return \SplFileInfo
*/
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@ -46,6 +46,8 @@ class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterfa
* {@inheritdoc}
*
* @throws InvalidArgumentException
*
* @return string
*/
public function normalize($object, $format = null, array $context = [])
{
@ -77,6 +79,8 @@ class DateIntervalNormalizer implements NormalizerInterface, DenormalizerInterfa
*
* @throws InvalidArgumentException
* @throws UnexpectedValueException
*
* @return \DateInterval
*/
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@ -57,6 +57,8 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface,
* {@inheritdoc}
*
* @throws InvalidArgumentException
*
* @return string
*/
public function normalize($object, $format = null, array $context = [])
{
@ -87,6 +89,8 @@ class DateTimeNormalizer implements NormalizerInterface, DenormalizerInterface,
* {@inheritdoc}
*
* @throws NotNormalizableValueException
*
* @return \DateTimeInterface
*/
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@ -25,6 +25,8 @@ class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterfa
* {@inheritdoc}
*
* @throws InvalidArgumentException
*
* @return string
*/
public function normalize($object, $format = null, array $context = [])
{
@ -47,6 +49,8 @@ class DateTimeZoneNormalizer implements NormalizerInterface, DenormalizerInterfa
* {@inheritdoc}
*
* @throws NotNormalizableValueException
*
* @return \DateTimeZone
*/
public function denormalize($data, $type, $format = null, array $context = [])
{

View File

@ -37,6 +37,8 @@ class ProblemNormalizer implements NormalizerInterface, CacheableSupportsMethodI
/**
* {@inheritdoc}
*
* @return array
*/
public function normalize($exception, $format = null, array $context = [])
{