New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DatePeriod::getEndDate can be null #5953
Comments
This looks like a perfect first contribution - do you want to fix it yourself? :) |
It depends on the desired fix :
To implement the second I will need a similar case in the codebase 😉 |
Right, I did overlook that this is a bit more complex. And I'm still lacking phpstan internal knowledge, but maybe @staabm knows which kind of extension this needs? |
usually you would need a I am not 100% sure, but I guess in the extension you may check with getRecurrences what was passed in as 3rd construct arg |
Thank @staabm I will try to make the PR |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/1f444637-6319-49d9-be32-fcabb3f7c84e
Expected output
DatePeriod::getEndDate
returnDateTimeInterface
when__construct
has for 3rd argument aDateTimeInterface
.PHP doc : public DatePeriod::getEndDate(): ?DateTimeInterface
PHPStan : 'DatePeriod::getEndDate' => ['DateTimeInterface'],
Did PHPStan help you today? Did it make you happy in any way?
PHPStan is one of the best things that happened in PHP ❤️
Thank Ondřej & contributors 👏
The text was updated successfully, but these errors were encountered: