Skip to content

Commit 8123548

Browse files
committed
Fix
1 parent 3e372d5 commit 8123548

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

rules-tests/Php85/Rector/Switch_/ColonAfterSwitchCaseRector/Fixture/fixture.php.inc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ final class Fixture
1313
echo 'baz';
1414
}
1515
}
16+
17+
public function spaceBeforeSemiColon()
18+
{
19+
switch ($value) {
20+
case 'baz' ;
21+
echo 'baz';
22+
}
23+
}
1624
}
1725

1826
?>
@@ -32,6 +40,14 @@ final class Fixture
3240
echo 'baz';
3341
}
3442
}
43+
44+
public function spaceBeforeSemiColon()
45+
{
46+
switch ($value) {
47+
case 'baz' :
48+
echo 'baz';
49+
}
50+
}
3551
}
3652

3753
?>

rules/Php85/Rector/Switch_/ColonAfterSwitchCaseRector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function refactor(Node $node): ?Node
9595
if ($nextToken->text === ';') {
9696
$hasChanged = true;
9797
$nextToken->text = ':';
98-
break;
98+
continue 2;
9999
}
100100
}
101101
}

0 commit comments

Comments
 (0)