| Total Complexity | 7 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 85.71% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | class DateTime implements TransformerInterface, TransformerViewInterface, TransformerFormInterface { |
||
| 19 | |||
| 20 | 3 | public static function transform($value) { |
|
| 21 | 3 | if ($value != null) |
|
| 22 | 3 | return new \DateTime ( $value ); |
|
| 23 | 1 | } |
|
| 24 | |||
| 25 | 3 | public static function reverse($value) { |
|
| 26 | 3 | if ($value instanceof \DateTime) { |
|
| 27 | return $value->format ( 'Y-m-d H:i:s' ); |
||
| 28 | } |
||
| 29 | 3 | return $value; |
|
| 30 | } |
||
| 31 | |||
| 32 | 3 | public static function toView($value) { |
|
| 34 | } |
||
| 35 | |||
| 36 | 2 | public static function toForm($value) { |
|
| 40 | } |
||
| 41 | } |
||
| 42 |