Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Php80] Skip ObjectType on ChangeSwitchToMatchRector (#5719)
* [Php80] Skip ObjectType on ChangeSwitchToMatchRector * [Php80] Skip ObjectType on ChangeSwitchToMatchRector
- Loading branch information
1 parent
d01d16e
commit fbba860
Showing
3 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
rules-tests/Php80/Rector/Switch_/ChangeSwitchToMatchRector/Fixture/skip_object_type.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,18 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\Php80\Rector\Switch_\ChangeSwitchToMatchRector\Fixture; | ||
|
||
use Rector\Tests\Php80\Rector\Switch_\ChangeSwitchToMatchRector\Source\SomeResponse; | ||
|
||
class SkipObjectType { | ||
public function doTheAction(SomeResponse $example): string | ||
{ | ||
switch ($example) { | ||
case $example::build('a', 'b'): | ||
return 'here'; | ||
break; | ||
default: | ||
return 'there'; | ||
} | ||
} | ||
} |
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
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