| Total Complexity | 4 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | class ValueObjectNormalizer implements NormalizerInterface, DenormalizerInterface |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @param mixed $data |
||
| 16 | * @param string $class |
||
| 17 | * @param string|null $format |
||
| 18 | * @param array $context |
||
| 19 | * @return ValueObjectInterface |
||
| 20 | */ |
||
| 21 | public function denormalize($data, $class, $format = null, array $context = []) |
||
| 22 | { |
||
| 23 | return $class::fromNative($data); |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param mixed $data |
||
| 28 | * @param string $type |
||
| 29 | * @param string|null $format |
||
| 30 | * @return bool |
||
| 31 | */ |
||
| 32 | public function supportsDenormalization($data, $type, $format = null) |
||
| 35 | } |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param ValueObjectInterface $object |
||
| 39 | * @param string|null $format |
||
| 40 | * @param array $context |
||
| 41 | * @return mixed |
||
| 42 | */ |
||
| 43 | public function normalize($object, $format = null, array $context = []) |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param mixed $data |
||
| 50 | * @param string|null $format |
||
| 51 | * @return bool |
||
| 52 | */ |
||
| 53 | public function supportsNormalization($data, $format = null) |
||
| 58 |