We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 42a67ac commit b164c7bCopy full SHA for b164c7b
1 file changed
rules/DeadCode/Rector/Stmt/RemoveNextSameValueConditionRector.php
@@ -90,10 +90,12 @@ public function refactor(Node $node): ?Node
90
if (! $stmt instanceof If_) {
91
continue;
92
}
93
+
94
// only when no elseif/else in current if
95
if ($stmt->elseifs !== []) {
96
97
98
99
if ($stmt->else instanceof Else_) {
100
101
@@ -115,10 +117,12 @@ public function refactor(Node $node): ?Node
115
117
if (! $this->nodeComparator->areNodesEqual($stmt->cond, $nextStmt->cond)) {
116
118
119
120
121
// only when no elseif/else in next stmt
122
if ($nextStmt->elseifs !== []) {
123
124
125
126
if ($nextStmt->else instanceof Else_) {
127
128
0 commit comments