| Conditions | 3 |
| Paths | 1 |
| Total Lines | 19 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 3.1406 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | 1 | public function apply(Builder $query, $value, $property): Builder |
|
| 14 | { |
||
| 15 | 1 | return parent::apply( |
|
| 16 | 1 | $query, |
|
| 17 | 1 | array_map( |
|
| 18 | function ($dateTime) { |
||
| 19 | 1 | if (is_string($dateTime)) { |
|
| 20 | 1 | return Carbon::parse($dateTime)->format('Y-m-d'); |
|
| 21 | } |
||
| 22 | |||
| 23 | if ($dateTime instanceof DateTimeInterface) { |
||
| 24 | return $dateTime->format('Y-m-d'); |
||
| 25 | } |
||
| 26 | |||
| 27 | return $dateTime; |
||
| 28 | 1 | }, |
|
| 29 | 1 | $value |
|
| 30 | ), |
||
| 31 | 1 | $property |
|
| 32 | ); |
||
| 35 |