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