| 1 | <?php |
||
| 11 | trait HasTimezones |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Return a timestamp as DateTime object. |
||
| 15 | * |
||
| 16 | * @param mixed $value |
||
| 17 | * |
||
| 18 | * @return \Illuminate\Support\Carbon |
||
| 19 | */ |
||
| 20 | protected function asDateTime($value) |
||
| 40 | |||
| 41 | /** |
||
| 42 | * Get a fresh timestamp for the model. |
||
| 43 | * |
||
| 44 | * @return \Illuminate\Support\Carbon |
||
| 45 | */ |
||
| 46 | public function freshTimestamp() |
||
| 54 | } |
||
| 55 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: