We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When I conditionally remove items from an array by using unset(), the possible sizes of the array are incorrect
unset()
https://phpstan.org/r/b4ad7637-32a2-4df6-b392-84e57180a55b
Since the array can have any size >= 0, no error should be detected.
Always!
The text was updated successfully, but these errors were encountered:
Works with count(): https://phpstan.org/r/f0c21ad2-2aca-403f-8cfc-77f22cd24daf
Sorry, something went wrong.
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.
Successfully merging a pull request may close this issue.
Bug report
When I conditionally remove items from an array by using
unset()
, the possible sizes of the array are incorrectCode snippet that reproduces the problem
https://phpstan.org/r/b4ad7637-32a2-4df6-b392-84e57180a55b
Expected output
Since the array can have any size >= 0, no error should be detected.
Did PHPStan help you today? Did it make you happy in any way?
Always!
The text was updated successfully, but these errors were encountered: