Skip to content

Commit 96a7133

Browse files
authored
Merge pull request #9719 from klimick/fix-declare-strict-types-unevaluated-code
Fix UnevaluatedCode false positive at declare(strict_types=1)
2 parents 2a221f6 + 0ae1b31 commit 96a7133

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/Psalm/Internal/Analyzer/StatementsAnalyzer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -496,6 +496,7 @@ private static function analyzeStatement(
496496
&& !($stmt instanceof PhpParser\Node\Stmt\Interface_)
497497
&& !($stmt instanceof PhpParser\Node\Stmt\Trait_)
498498
&& !($stmt instanceof PhpParser\Node\Stmt\HaltCompiler)
499+
&& !($stmt instanceof PhpParser\Node\Stmt\Declare_)
499500
) {
500501
if ($codebase->find_unused_variables) {
501502
IssueBuffer::maybeAdd(

0 commit comments

Comments
 (0)