| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class DateTimeNormalizer implements NormalizerInterface, CacheableSupportsMethodInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | 14 | public function normalize($object, $format = null, array $context = []): string |
|
| 20 | { |
||
| 21 | 14 | return Carbon::instance($object)->toISOString(); |
|
|
|
|||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * {@inheritdoc} |
||
| 26 | */ |
||
| 27 | 28 | public function supportsNormalization($data, $format = null): bool |
|
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 28 | public function hasCacheableSupportsMethod(): bool |
|
| 38 | } |
||
| 39 | } |
||
| 40 |