| 1 | <?php |
||
| 15 | final class SwaggerDecorator implements NormalizerInterface |
||
| 16 | { |
||
| 17 | private $decorated; |
||
| 18 | |||
| 19 | 27 | public function __construct(NormalizerInterface $decorated) |
|
| 23 | |||
| 24 | /** |
||
| 25 | * @param mixed $object Object to normalize |
||
| 26 | * @param string $format Format the normalization result will be encoded as |
||
|
|
|||
| 27 | * |
||
| 28 | * @return array|string|int|float|bool |
||
| 29 | */ |
||
| 30 | 1 | public function normalize($object, $format = null, array $context = []) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * {@inheritdoc} |
||
| 43 | */ |
||
| 44 | 18 | public function supportsNormalization($data, $format = null): bool |
|
| 48 | } |
||
| 49 |
This check looks for
@paramannotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.