-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
- Loading branch information
1 parent
061ddc3
commit f24b01a
Showing
2 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
...Quality/Rector/Switch_/SingularSwitchToIfRector/Fixture/default_only_with_a_break.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,37 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Switch_\SingularSwitchToIfRector\Fixture; | ||
|
||
final class DefaultOnly | ||
{ | ||
public function run($value) | ||
{ | ||
$result = 1; | ||
switch ($value) { | ||
default: | ||
$result = 1000; | ||
break; | ||
} | ||
|
||
return $result; | ||
} | ||
} | ||
|
||
?> | ||
----- | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\Switch_\SingularSwitchToIfRector\Fixture; | ||
|
||
final class DefaultOnly | ||
{ | ||
public function run($value) | ||
{ | ||
$result = 1; | ||
$result = 1000; | ||
|
||
return $result; | ||
} | ||
} | ||
|
||
?> |
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