Bug report
Code snippet that reproduces the problem
See the discussion here: #5976
And reproduced here: https://phpstan.org/r/1ab1e0c7-e641-4e54-9037-46af0e4f37fa
Expected output
PHPStan should not report the if-check.
Did PHPStan help you today? Did it make you happy in any way?
Thanks for making PHPStan. It has helped my work a lot.