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