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 eda7704 commit b1506efCopy full SHA for b1506ef
rules/Php85/Rector/Switch_/ColonAfterSwitchCaseRector.php
@@ -65,13 +65,13 @@ public function refactor(Node $node): ?Node
65
continue;
66
}
67
68
- $startCaseStmtsPos = count($case->stmts) === 0
69
- ? (
70
- isset($node->cases[$key + 1])
+ if (count($case->stmts) === 0) {
+ $startCaseStmtsPos = isset($node->cases[$key + 1])
71
? $node->cases[$key + 1]->getStartTokenPos()
72
- : $node->getEndTokenPos()
73
- )
74
- : $case->stmts[0]->getStartTokenPos();
+ : $node->getEndTokenPos();
+ } else {
+ $startCaseStmtsPos = $case->stmts[0]->getStartTokenPos();
+ }
75
76
if ($startCaseStmtsPos < 0) {
77
0 commit comments