Bug report
In this example on level 4, phpstan seems to assume that $b cannot be true if we reach the elseif, however if I set the strict parameter of in_array to true, or if i replace the in_array comparison with $a == 1 for example, this doesn't happen. If I typehint parameter $a as int, it also doesn't happen.
Code snippet that reproduces the problem
https://phpstan.org/r/caa93f12-eb6f-4af4-8426-f95a9e636f2a
Expected output
No warnings should appear for level 4 and 5 with this example, without adding types.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
In this example on level 4, phpstan seems to assume that $b cannot be true if we reach the elseif, however if I set the strict parameter of in_array to true, or if i replace the in_array comparison with $a == 1 for example, this doesn't happen. If I typehint parameter $a as int, it also doesn't happen.
Code snippet that reproduces the problem
https://phpstan.org/r/caa93f12-eb6f-4af4-8426-f95a9e636f2a
Expected output
No warnings should appear for level 4 and 5 with this example, without adding types.
Did PHPStan help you today? Did it make you happy in any way?
No response