$start of type DateTimeInterface is incompatible with the type null|string expected by parameter $time of Cake\Chronos\Chronos::__construct().
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
14
$start = new Chronos(/** @scrutinizer ignore-type */ $start);
Loading history...
15
$end = new Chronos($end);
16
17
if (
18
$start->isFuture() ||
19
$end->isFuture() ||
20
$start > $end
21
) {
22
throw new DateException('Date range is incorrect');