-
-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip coalesce on StrictArrayParamDimFetchRector (#4589
) * [TypeDeclaration] Skip coalesce on StrictArrayParamDimFetchRector * Fix * assingop * stop early * fix * fix phpstan
- Loading branch information
1 parent
e9e6a42
commit 6658a0e
Showing
4 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
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
13 changes: 13 additions & 0 deletions
13
...claration/Rector/ClassMethod/StrictArrayParamDimFetchRector/Fixture/skip_coalesce.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,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector\Fixture; | ||
|
||
final class SkipCoalesce | ||
{ | ||
public function run($productOptions) | ||
{ | ||
$productOptions = $productOptions ?? []; | ||
|
||
$productOptions['list'] = $productOptions['list'] ?? 'list'; | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
...laration/Rector/ClassMethod/StrictArrayParamDimFetchRector/Fixture/skip_coalesce2.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,13 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector\Fixture; | ||
|
||
final class SkipCoalesce2 | ||
{ | ||
public function run($productOptions) | ||
{ | ||
$productOptions ??= []; | ||
|
||
$productOptions['list'] = $productOptions['list'] ?? 'list'; | ||
} | ||
} |
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