### Bug report Consider this code: ```php function getEnumValue(string $enumFqcn, string $name): mixed { if (enum_exists($enumFqcn)) { return (new \ReflectionEnum($enumFqcn))->getCase($name)->getValue(); } return null; } ``` The $enumFqcn should be considered as `class-string<UnitEnum>` under the `if` statement. ### Code snippet that reproduces the problem https://phpstan.org/r/5bab6187-d8c9-40fb-a8e4-9bf830af3075 ### Expected output No error expected. ### Did PHPStan help you today? Did it make you happy in any way? _No response_