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
We got an assign.propertyType error in the following snippet
Assuming that explode returns a list of strings and since the size has already been asserted to be of two (or else we would throw), why would any call to array_shift or array_pop return null as long as the array has elements?
We tested this same code with direct array access ($pieces[0] and $pieces[1]) and everything is fine.
We would expect no issue to be detected. Please, correct us if we are wrong.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan makes me very, very, very happy on a daily basis. I feel much more confident in our codebase and it has helped us catch many obscure and insidious potential problems.
The text was updated successfully, but these errors were encountered:
Bug report
Hi:
We got an assign.propertyType error in the following snippet
Assuming that explode returns a list of strings and since the size has already been asserted to be of two (or else we would throw), why would any call to array_shift or array_pop return null as long as the array has elements?
We tested this same code with direct array access ($pieces[0] and $pieces[1]) and everything is fine.
Code snippet that reproduces the problem
https://phpstan.org/r/f80ce8d4-5b2c-40f3-bd56-48ee5998a24f
Expected output
We would expect no issue to be detected. Please, correct us if we are wrong.
Did PHPStan help you today? Did it make you happy in any way?
PHPStan makes me very, very, very happy on a daily basis. I feel much more confident in our codebase and it has helped us catch many obscure and insidious potential problems.
The text was updated successfully, but these errors were encountered: