Skip to content

Commit 54c68ac

Browse files
committed
fix cs
1 parent 979b614 commit 54c68ac

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,11 @@ public function processNodes(
334334
$nextStatements[] = $nextStmt;
335335
}
336336

337-
if ($unreachableStatement instanceof Node\Stmt) {
338-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
337+
if (!$unreachableStatement instanceof Node\Stmt) {
338+
continue;
339339
}
340+
341+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
340342
}
341343
}
342344

@@ -442,9 +444,11 @@ public function processStmtNodes(
442444
$nextStatements[] = $nextStmt;
443445
}
444446

445-
if ($unreachableStatement instanceof Node\Stmt) {
446-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
447+
if (!$unreachableStatement instanceof Node\Stmt) {
448+
continue;
447449
}
450+
451+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
448452
}
449453

450454
$statementResult = new StatementResult($scope, $hasYield, $alreadyTerminated, $exitPoints, $throwPoints, $impurePoints);

0 commit comments

Comments
 (0)