-
-
Notifications
You must be signed in to change notification settings - Fork 934
Closed
Description
Bug report
PHPStan believes that DatePeriod::getEndDate will always return a DateTimeInterface object while it can also return null if no end date can be computed from the DatePeriod constructor input see https://www.php.net/manual/en/dateperiod.getenddate.php
Code snippet that reproduces the problem
https://phpstan.org/r/93804099-9892-4e17-a54e-6b9b8d18be62
and
Expected output
Expect no error to be display
Metadata
Metadata
Assignees
Labels
No labels