-
-
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 different array_filter value on SimplifyEmptyArray…
…CheckRector (#3000) * [CodeQuality] Skip different array_filter value on SimplifyEmptyArrayCheckRector * Fixed 🎉 * cs fix
- Loading branch information
1 parent
63976bc
commit 56620a9
Showing
2 changed files
with
15 additions
and
1 deletion.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
...ooleanAnd/SimplifyEmptyArrayCheckRector/Fixture/skip_different_array_filter_value.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\BooleanAnd\SimplifyEmptyArrayCheckRector\Fixture; | ||
|
||
final class SkipDifferentArrayFilterValue | ||
{ | ||
public function functionCallInsideEmpty($a, $values): bool | ||
{ | ||
return is_array($a) && empty(array_filter($values)); | ||
} | ||
} |
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