Skip to content

Commit

Permalink
Remove redundant condition
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Mar 6, 2020
1 parent 766effb commit 352bd3f
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions src/Psalm/Internal/Analyzer/StatementsAnalyzer.php
Original file line number Diff line number Diff line change
Expand Up @@ -645,16 +645,14 @@ function ($line) {
&& ($context->mutation_free
|| $context->external_mutation_free)
) {
if ($context->mutation_free || $context->external_mutation_free) {
if (IssueBuffer::accepts(
new ImpureFunctionCall(
'Cannot call echo from a mutation-free context',
new CodeLocation($this, $stmt)
),
$this->getSuppressedIssues()
)) {
// fall through
}
if (IssueBuffer::accepts(
new ImpureFunctionCall(
'Cannot call echo from a mutation-free context',
new CodeLocation($this, $stmt)
),
$this->getSuppressedIssues()
)) {
// fall through
}
}
} elseif ($stmt instanceof PhpParser\Node\Stmt\Function_) {
Expand Down

0 comments on commit 352bd3f

Please sign in to comment.