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/d946add113
In this case RedundantCondition is invalid.
RedundantCondition
The text was updated successfully, but these errors were encountered:
I found these snippets:
<?php class Obj { public function __construct( private int $value, ) {} public function isEqual(Obj $b): bool { return $this->value === $b->value; } } function isEqual(?Obj $a, ?Obj $b): bool { if ($a === null && $b === null) { return true; } /** @psalm-trace $a, $b */ if ( ($a === null && $b !== null) || ($a !== null && $b === null) ) { return false; } return $a->isEqual($b); }
Psalm output (using commit 16b24bd): ERROR: RedundantCondition - 22:25 - Obj can never contain null ERROR: RedundantCondition - 23:13 - Obj can never contain null INFO: Trace - 21:5 - $a: Obj INFO: Trace - 21:5 - $b: Obj
Sorry, something went wrong.
No branches or pull requests
https://psalm.dev/r/d946add113
In this case
RedundantCondition
is invalid.The text was updated successfully, but these errors were encountered: