Total Complexity | 3 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class CarbonToDateTimeTransformer implements DataTransformerInterface |
||
15 | { |
||
16 | |||
17 | /** |
||
18 | * Carbon actually inherits DateTime, no conversion needed |
||
19 | * |
||
20 | * @param null|Carbon $value |
||
21 | * |
||
22 | * @return null|DateTime |
||
23 | */ |
||
24 | 1 | public function transform($value): ?DateTime |
|
25 | { |
||
26 | 1 | return $value; |
|
27 | } |
||
28 | |||
29 | /** |
||
30 | * @param null|DateTime $value |
||
31 | * |
||
32 | * @return null|Carbon |
||
33 | */ |
||
34 | 1 | public function reverseTransform($value): ?Carbon |
|
37 | } |
||
38 | } |
||
39 |