Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeQuality] Skip nested array on InlineArrayReturnAssignRector (#5680
) * add failing test for InlineArrayReturnAssignRector when using dynamic array definition * Test auto commit after update github actions (#5676) * Test auto commit after update github actions * [ci-review] Rector Rectify --------- Co-authored-by: GitHub Action <actions@github.com> * [CodeQuality] Skip nested array on InlineArrayReturnAssignRector * [ci-review] Rector Rectify --------- Co-authored-by: Kévin Grenier <kgrenier@campings.com> Co-authored-by: GitHub Action <actions@github.com>
- Loading branch information
1 parent
ce70534
commit c591bd2
Showing
2 changed files
with
24 additions
and
1 deletion.
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
...uality/Rector/ClassMethod/InlineArrayReturnAssignRector/Fixture/skip_nested_array.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,15 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector\Fixture; | ||
|
||
final class SkipNestedArray | ||
{ | ||
public function run() | ||
{ | ||
$arr = []; | ||
$arr['foo']['bar']['baz'] = ['a' => 1, 'b' => 2]; | ||
|
||
return $arr; | ||
} | ||
} | ||
|
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