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
This happend while trying to check if any value in my array is strictly equal to null (in_array(null, $array, true)) on an array having a value possibly null or boolean.
It throw an error function.alreadyNarrowedType telling that the result of the in_array is always true
It also throw an error deadCode.unreachable as a by-product
Bug report
This happend while trying to check if any value in my array is strictly equal to
null
(in_array(null, $array, true)
) on an array having a value possiblynull or boolean
.It throw an error
function.alreadyNarrowedType
telling that the result of the in_array is always trueIt also throw an error
deadCode.unreachable
as a by-productCode snippet that reproduces the problem
https://phpstan.org/r/06e26187-5d60-4337-9b1f-dfff6286bdf6
Expected output
Should not return any error
Did PHPStan help you today? Did it make you happy in any way?
Yes, helped me avoiding a lot of error in production :)
The text was updated successfully, but these errors were encountered: