We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://psalm.dev/r/1d89182ec6
I think this should not infer that the string length is always 0. With mixed as type I don't think you can know that it always reduces to 0.
mixed
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php /** @var array<array-key, mixed> $array */ $array = []; $iLen = strlen($array['offset'] ?? ''); if ($iLen === 0) { }
Psalm output (using commit ffc8c80): INFO: MixedArgument - 6:16 - Argument 1 of strlen cannot be ''|mixed, expecting string ERROR: RedundantConditionGivenDocblockType - 8:5 - Docblock-defined type 0 for $iLen is always =int(0)
Sorry, something went wrong.
No branches or pull requests
https://psalm.dev/r/1d89182ec6
I think this should not infer that the string length is always 0. With
mixed
as type I don't think you can know that it always reduces to 0.The text was updated successfully, but these errors were encountered: