Bug report
If I implement the code as reproduced, the string constant is converted to a type like literal-string&non-falsy-string.
I have found that hinting the bool type with @var for $found works as expected.
Code snippet that reproduces the problem
https://phpstan.org/r/e8216080-38be-4654-b09d-1ffda02e1f34
Expected output
I expect the type to be the same as the return type of the method in the reproduced code.
Did PHPStan help you today? Did it make you happy in any way?
No response
Bug report
If I implement the code as reproduced, the string constant is converted to a type like
literal-string&non-falsy-string.I have found that hinting the bool type with
@varfor$foundworks as expected.Code snippet that reproduces the problem
https://phpstan.org/r/e8216080-38be-4654-b09d-1ffda02e1f34
Expected output
I expect the type to be the same as the return type of the method in the reproduced code.
Did PHPStan help you today? Did it make you happy in any way?
No response