# Bug report After an `if` branch phpstan detects the variable of a wrong type. Sure moving the `apply` inside the `if` fixes the problem, but it smells a lot. ### Code snippet that reproduces the problem https://phpstan.org/r/5c6d4ab7-013c-40cb-a867-da3b42288d4c ### Expected output No errors ### Did PHPStan help you today? Did it make you happy in any way? Thank you everybody for your hard work!