Skip to content

Commit c63cb28

Browse files
committed
Update rector.php
1 parent b5e16e9 commit c63cb28

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

rector.php

Lines changed: 11 additions & 1 deletion
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,10 +113,16 @@
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
/**
115-
* The INLINE_PUBLIC value is default to false to avoid BC break, if you use for libraries and want to preserve BC break, you don't need to configure it, as it included in LevelSetList::UP_TO_PHP_74
123+
* The INLINE_PUBLIC value is default to false to avoid BC break,
124+
* if you use for libraries and want to preserve BC break, you don't
125+
* need to configure it, as it included in LevelSetList::UP_TO_PHP_74
116126
* Set to true for projects that allow BC break
117127
*/
118128
TypedPropertyFromAssignsRector::INLINE_PUBLIC => true,

0 commit comments

Comments
 (0)