-
-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TypeDeclaration] Skip re-assign with call and use as arg on StrictAr…
…rayParamDimFetchRector (#5434) * [TypeDeclaration] Skip re-assign with call on StrictArrayParamDimFetchRector * fix * [ci-review] Rector Rectify * fix phpstan --------- Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
d4f6b91
commit 3d71ae3
Showing
3 changed files
with
57 additions
and
2 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
17 changes: 17 additions & 0 deletions
17
...Rector/ClassMethod/StrictArrayParamDimFetchRector/Fixture/skip_reassign_with_call.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,17 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector\Fixture; | ||
|
||
final class SkipReassignWithCall | ||
{ | ||
public function addSuccessMessage($maybe_not_array) | ||
{ | ||
$maybe_not_array = $this->convert($maybe_not_array); | ||
echo $maybe_not_array['test']; | ||
} | ||
|
||
private function convert($maybe_not_array) | ||
{ | ||
return ['test' => 'test']; | ||
} | ||
} |
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