The expression return Carbon\Carbon::in...$object)->toISOString() could return the type null which is incompatible with the type-hinted return string. Consider adding an additional type-check to rule them out.
Loading history...
22
}
23
24
/**
25
* {@inheritdoc}
26
*/
27
28
public function supportsNormalization($data, $format = null): bool
28
{
29
28
return $data instanceof \DateTime;
30
}
31
32
/**
33
* {@inheritdoc}
34
*/
35
28
public function hasCacheableSupportsMethod(): bool