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
I have tried to narrow down the problem and I found that PHPStan correctly assumes the type if the (possible null) bool value is compared to TRUE but throws an error if compared to FALSE. Since both comparisons are strict I believe this to be a bug.
Here is the issue demonstrated using the PHPStan playground:
Bug report
Subsequent nullsafe method calls on nullable variable results in false positive.
Code snippet that reproduces the problem
https://phpstan.org/r/6ec02114-a3fc-4815-b655-7c688e67c445
Expected output
No error expected; false positive.
The text was updated successfully, but these errors were encountered: