Skip to content

Commit 4ee2951

Browse files
committed
fix cs
1 parent cde6d51 commit 4ee2951

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
@@ -326,9 +326,11 @@ public function processNodes(
326326
$nextStatements[] = $nextStmt;
327327
}
328328

329-
if ($unreachableStatement instanceof Node\Stmt) {
330-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
329+
if (!$unreachableStatement instanceof Node\Stmt) {
330+
continue;
331331
}
332+
333+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
332334
}
333335
}
334336

@@ -433,9 +435,11 @@ public function processStmtNodes(
433435
$nextStatements[] = $nextStmt;
434436
}
435437

436-
if ($unreachableStatement instanceof Node\Stmt) {
437-
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
438+
if (!$unreachableStatement instanceof Node\Stmt) {
439+
continue;
438440
}
441+
442+
$nodeCallback(new UnreachableStatementNode($unreachableStatement, $nextStatements), $scope);
439443
}
440444

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

0 commit comments

Comments
 (0)