diff --git a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php index b977853751e..8f75aab7990 100644 --- a/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php +++ b/rules/EarlyReturn/Rector/If_/RemoveAlwaysElseRector.php @@ -170,7 +170,9 @@ private function doesNotLastStatementBreakFlow(If_ | ElseIf_ | Else_ $node): boo $lastStmt = end($node->stmts); if ($lastStmt instanceof If_ && $lastStmt->else instanceof Else_) { - if ($this->doesNotLastStatementBreakFlow($lastStmt) || $this->doesNotLastStatementBreakFlow($lastStmt->else)) { + if ($this->doesNotLastStatementBreakFlow($lastStmt) || $this->doesNotLastStatementBreakFlow( + $lastStmt->else + )) { return true; }