It seems like $dateTime can also be of type false; however, parameter $dateTime of Tardigrades\SectionField...t\Before::__construct() does only seem to accept DateTimeInterface, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation
39
return new self(/** @scrutinizer ignore-type */ $dateTime);
Loading history...
40
}
41
42
public static function fromDateTime(\DateTime $dateTime): self
43
{
44
return new self(\DateTimeImmutable::createFromMutable($dateTime));