Skip to content

Commit 0ae3a9a

Browse files
committed
Add empty related rules
1 parent f59886e commit 0ae3a9a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

rector.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
66
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
7+
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
78
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
89
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
910
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
@@ -14,6 +15,7 @@
1415
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
1516
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
1617
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
18+
use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector;
1719
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
1820
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
1921
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
@@ -34,6 +36,8 @@
3436
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
3537
use Rector\Set\ValueObject\LevelSetList;
3638
use Rector\Set\ValueObject\SetList;
39+
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
40+
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
3741
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
3842

3943
return static function (RectorConfig $rectorConfig): void {
@@ -109,6 +113,10 @@
109113
$rectorConfig->rule(FuncGetArgsToVariadicParamRector::class);
110114
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);
111115
$rectorConfig->rule(SimplifyEmptyArrayCheckRector::class);
116+
$rectorConfig->rule(SimplifyEmptyCheckOnEmptyArrayRector::class);
117+
$rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class);
118+
$rectorConfig->rule(EmptyOnNullableObjectToInstanceOfRector::class);
119+
$rectorConfig->rule(DisallowedEmptyRuleFixerRector::class);
112120
$rectorConfig
113121
->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [
114122
/**

0 commit comments

Comments
 (0)