Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DeadCode] Skip multi no stmts on RemoveDuplicatedCaseInSwitchRector (#…
…5258) * [DeadCode] Handle multi no stmts on RemoveDuplicatedCaseInSwitchRector * Fixed 🎉
- Loading branch information
1 parent
2d1b9ab
commit 4a3e698
Showing
2 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
...ode/Rector/Switch_/RemoveDuplicatedCaseInSwitchRector/Fixture/skip_multi_no_stmts.php.inc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\DeadCode\Rector\Switch_\RemoveDuplicatedCaseInSwitchRector\Fixture; | ||
|
||
class SkipMultiNoStmts | ||
{ | ||
public function run($foo) | ||
{ | ||
switch ($foo) { | ||
default: | ||
case 'A': | ||
// Nothing to do | ||
break; | ||
case 'B': | ||
case 'C': | ||
// Nothing to do 2 | ||
break; | ||
case 'D': | ||
$type = 'BAR'; | ||
break; | ||
case 'E': | ||
case 'F': | ||
// Nothing to do 3 | ||
break; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters