Skip to content

Commit 2c7a6c7

Browse files
committed
chore: add empty rules
1 parent b9df900 commit 2c7a6c7

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
@@ -2,6 +2,7 @@
22

33
use Rector\CodeQuality\Rector\BooleanAnd\SimplifyEmptyArrayCheckRector;
44
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
5+
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
56
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
67
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
78
use Rector\CodeQuality\Rector\FuncCall\ChangeArrayPushToArrayAssignRector;
@@ -12,6 +13,7 @@
1213
use Rector\CodeQuality\Rector\If_\ShortenElseIfRector;
1314
use Rector\CodeQuality\Rector\If_\SimplifyIfElseToTernaryRector;
1415
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
16+
use Rector\CodeQuality\Rector\Ternary\TernaryEmptyArrayArrayDimFetchToCoalesceRector;
1517
use Rector\CodeQuality\Rector\Ternary\UnnecessaryTernaryExpressionRector;
1618
use Rector\CodingStyle\Rector\ClassMethod\FuncGetArgsToVariadicParamRector;
1719
use Rector\CodingStyle\Rector\ClassMethod\MakeInheritedMethodVisibilitySameAsParentRector;
@@ -31,6 +33,8 @@
3133
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
3234
use Rector\Set\ValueObject\LevelSetList;
3335
use Rector\Set\ValueObject\SetList;
36+
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
37+
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
3438
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
3539

3640
return static function (RectorConfig $rectorConfig): void {
@@ -108,6 +112,10 @@
108112
$rectorConfig->rule(FuncGetArgsToVariadicParamRector::class);
109113
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);
110114
$rectorConfig->rule(SimplifyEmptyArrayCheckRector::class);
115+
$rectorConfig->rule(SimplifyEmptyCheckOnEmptyArrayRector::class);
116+
$rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class);
117+
$rectorConfig->rule(EmptyOnNullableObjectToInstanceOfRector::class);
118+
$rectorConfig->rule(DisallowedEmptyRuleFixerRector::class);
111119
$rectorConfig
112120
->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [
113121
/**

0 commit comments

Comments
 (0)