You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that the type of $items is different depending on where in the loop you are - as in it is inferred like it is a run once loop. When actually because it’s a loop the types should be the same throughout.
Definitely terrible code example but a good demonstration.
Bug report
It seems that the type of $items is different depending on where in the loop you are - as in it is inferred like it is a run once loop. When actually because it’s a loop the types should be the same throughout.
Definitely terrible code example but a good demonstration.
Code snippet that reproduces the problem
https://phpstan.org/r/32a3c556-8022-4599-a675-e7cc7290e107
Expected output
Clean with no errors
Did PHPStan help you today? Did it make you happy in any way?
I will forever be a happy PHPStan user!
The text was updated successfully, but these errors were encountered: