| Total Complexity | 1 |
| Total Lines | 23 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | trait DateTimeCastTrait |
||
| 12 | { |
||
| 13 | |||
| 14 | use AbstractTrait; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Interpret the expression as a datetime. |
||
| 18 | * |
||
| 19 | * > Warning: If the expression's value is in the local timezone |
||
| 20 | * > you should chain this with {@link DateTime::toUTC()} |
||
| 21 | * |
||
| 22 | * SQLite: |
||
| 23 | * - The expression's value must conform to one of any `time-value` formats. |
||
| 24 | * - https://www.sqlite.org/lang_datefunc.html |
||
| 25 | * |
||
| 26 | * MySQL: |
||
| 27 | * - The expression's value must conform to `YYYY-MM-DD` or `YYYY-MM-DD hh:mm:ss` |
||
| 28 | * |
||
| 29 | * @return DateTime |
||
| 30 | */ |
||
| 31 | public function toDateTime() |
||
| 36 |