1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00

flag alwaysTruthy conditions as redundant

This commit is contained in:
orklah 2021-09-12 22:53:44 +02:00
parent f496ccaa25
commit 44bfa2c21c

View File

@ -242,7 +242,7 @@ class IfConditionalAnalyzer
// fall through
}
}
} elseif ($cond_type->isTrue()) {
} elseif ($cond_type->isAlwaysTruthy()) {
if ($cond_type->from_docblock) {
if (IssueBuffer::accepts(
new RedundantConditionGivenDocblockType(