| Total Complexity | 3 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class AttributeOptionNormalizer implements NormalizerInterface |
||
| 8 | { |
||
| 9 | /** @var NormalizerInterface */ |
||
| 10 | private $baseNormalizer; |
||
| 11 | |||
| 12 | public function __construct(NormalizerInterface $baseNormalizer) |
||
| 13 | { |
||
| 14 | $this->baseNormalizer = $baseNormalizer; |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * {@inheritdoc} |
||
| 19 | */ |
||
| 20 | public function normalize($object, $format = null, array $context = []) |
||
| 21 | { |
||
| 22 | $normalizedValues = $this->baseNormalizer->normalize($object, $format, $context); |
||
| 23 | |||
| 24 | $normalizedValues['type'] = $object->getType(); |
||
| 25 | $normalizedValues['type_config'] = $object->getTypeConfig(); |
||
| 26 | $normalizedValues['constraints'] = $object->getConstraints(); |
||
| 27 | |||
| 28 | return $normalizedValues; |
||
| 29 | } |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param mixed $data |
||
| 33 | * @param null $format |
||
|
|
|||
| 34 | * @return bool |
||
| 35 | */ |
||
| 36 | public function supportsNormalization($data, $format = null) |
||
| 39 | } |
||
| 40 | } |
||
| 41 |