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
Adding @param-immediately-invoked-callable $c in phpdoc seems to create an implicit @param callable $c parameter even though it does not exist in the phpdoc, which is then reported as being incompatible with the native type.
Either the implicit tag should make a better guess for the type by using the native type (or an intersection of the native type and callable) or the implicit type should be excluded from the rule checking compatibility.
Bug report
Adding
@param-immediately-invoked-callable $c
in phpdoc seems to create an implicit@param callable $c
parameter even though it does not exist in the phpdoc, which is then reported as being incompatible with the native type.Either the implicit tag should make a better guess for the type by using the native type (or an intersection of the native type and
callable
) or the implicit type should be excluded from the rule checking compatibility.Code snippet that reproduces the problem
https://phpstan.org/r/000fd2ae-c728-4013-a5c7-6a9dd6b846fe
Expected output
No error being reported about an invalid
@param
tag which does not exist.Did PHPStan help you today? Did it make you happy in any way?
No response
The text was updated successfully, but these errors were encountered: