-
-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php80] Skip no default return fluent on ChangeSwitchToMatchRector (#…
- Loading branch information
1 parent
f90acd4
commit 3f0a0b7
Showing
2 changed files
with
50 additions
and
5 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
...80/Rector/Switch_/ChangeSwitchToMatchRector/Fixture/skip_no_default_return_fluent.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,22 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Switch_\ChangeSwitchToMatchRector\Fixture; | ||
|
||
class SkipNoDefaultReturnFluent | ||
{ | ||
private ?string $result = null; | ||
|
||
public function run($value) | ||
{ | ||
switch (strtolower($value)) { | ||
case 'a': | ||
$this->result = 0; | ||
break; | ||
case 'b': | ||
$this->result = 1; | ||
break; | ||
} | ||
|
||
return $this; | ||
} | ||
} |
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