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
There are assertions that prove something is X, but doesn't prove otherwise. That means not all X pass this assertion.
If one passes an already known X to that kind of assertion, PHPStan yields false-positive will always evaluate to true. The analyzer doesn't check the context.
Bug report
There are assertions that prove something is X, but doesn't prove otherwise. That means not all X pass this assertion.
If one passes an already known X to that kind of assertion, PHPStan yields false-positive
will always evaluate to true
. The analyzer doesn't check the context.Code snippet that reproduces the problem
https://phpstan.org/r/1912878d-c976-4619-88a5-7d59f226a00d
Expected output
No errors.
ctype_digit
proves it's anumeric-string
, but doesn't prove otherwise.https://github.com/phpstan/phpstan-src/blob/1.8.x/src/Type/Php/CtypeDigitFunctionTypeSpecifyingExtension.php#L46
The text was updated successfully, but these errors were encountered: