| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 44 | public function parseValue($value) |
||
| 45 | { |
||
| 46 | if (!is_string($value)) { // quite naive, but after all this is example |
||
| 47 | throw new \UnexpectedValueException('Cannot represent value as Chronos date: ' . Utils::printSafe($value)); |
||
| 48 | } |
||
| 49 | |||
| 50 | $date = new Date($value); |
||
| 51 | $date = new Date($date->format('Y-m-d')); |
||
| 52 | |||
| 53 | return $date; |
||
| 54 | } |
||
| 74 |