-
-
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.
[TypeDeclaration] Skip multi return types on ReturnTypeFromReturnDire…
…ctArrayRector (#3164) * [TypeDeclaration] Skip multi return types on ReturnTypeFromReturnDirectArrayRector * Fixed 🎉 * [ci-review] Rector Rectify * [ci-review] Rector Rectify * Fix * Fix * [ci-review] Rector Rectify * Fix * Final touch: eol Co-authored-by: GitHub Action <action@github.com>
- Loading branch information
1 parent
f35326d
commit 045ada5
Showing
3 changed files
with
48 additions
and
7 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
...ClassMethod/ReturnTypeFromReturnDirectArrayRector/Fixture/skip_multi_types_return.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,19 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector\Fixture; | ||
|
||
final class SkipMultiTypesReturn | ||
{ | ||
public function getArray($action) | ||
{ | ||
switch ($action) { | ||
case 'save': | ||
return 17; | ||
default: | ||
return null; | ||
} | ||
return []; | ||
} | ||
} |
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