| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class AbstractDateTime |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * Returns a new DateTime object. |
||
| 9 | * |
||
| 10 | * @param mixed $value The incoming date/time value. |
||
| 11 | * |
||
| 12 | * @return mixed If the value is already a DateTime then it is returned |
||
| 13 | * as-is; if the value is invalid as a date/time then `false` is returned; |
||
| 14 | * otherwise, a new DateTime is constructed from the value and returned. |
||
| 15 | */ |
||
| 16 | 66 | protected function newDateTime($value) |
|
| 41 |