-
-
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.
[CodeQuality] Skip empty array push args and no 2nd arg on ChangeArra…
…yPushToArrayAssignRector (#2266) * [CodeQuality] Skip empty array push args and no 2nd arg on ChangeArrayPushToArrayAssignRector * Fixed 🎉
- Loading branch information
1 parent
88c9b8e
commit ae2e38e
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...uality/Rector/FuncCall/ChangeArrayPushToArrayAssignRector/Fixture/skip_empty_args.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\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector\Fixture; | ||
|
||
class SkipEmptyArgs | ||
{ | ||
public function run() | ||
{ | ||
array_push(); | ||
|
||
echo 'test'; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
...ity/Rector/FuncCall/ChangeArrayPushToArrayAssignRector/Fixture/skip_no_second_arg.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,11 @@ | ||
<?php | ||
|
||
namespace Rector\Tests\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector\Fixture; | ||
|
||
class SkipNoSecondArg | ||
{ | ||
public function run(array $items) | ||
{ | ||
array_push($items); | ||
} | ||
} |
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