Skip to content

Commit 2f0669d

Browse files
committed
chore: update rector.php from devkit
1 parent c290908 commit 2f0669d

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

rector.php

Lines changed: 12 additions & 2 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,12 +15,12 @@
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;
2022
use Rector\CodingStyle\Rector\FuncCall\CountArrayToEmptyArrayComparisonRector;
2123
use Rector\Config\RectorConfig;
22-
use Rector\Core\ValueObject\PhpVersion;
2324
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector;
2425
use Rector\EarlyReturn\Rector\Foreach_\ChangeNestedForeachIfsToEarlyContinueRector;
2526
use Rector\EarlyReturn\Rector\If_\ChangeIfElseValueAssignToEarlyReturnRector;
@@ -34,7 +35,10 @@
3435
use Rector\Privatization\Rector\Property\PrivatizeFinalClassPropertyRector;
3536
use Rector\Set\ValueObject\LevelSetList;
3637
use Rector\Set\ValueObject\SetList;
38+
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
39+
use Rector\TypeDeclaration\Rector\Empty_\EmptyOnNullableObjectToInstanceOfRector;
3740
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
41+
use Rector\ValueObject\PhpVersion;
3842

3943
return static function (RectorConfig $rectorConfig): void {
4044
$rectorConfig->sets([
@@ -110,10 +114,16 @@
110114
$rectorConfig->rule(FuncGetArgsToVariadicParamRector::class);
111115
$rectorConfig->rule(MakeInheritedMethodVisibilitySameAsParentRector::class);
112116
$rectorConfig->rule(SimplifyEmptyArrayCheckRector::class);
117+
$rectorConfig->rule(SimplifyEmptyCheckOnEmptyArrayRector::class);
118+
$rectorConfig->rule(TernaryEmptyArrayArrayDimFetchToCoalesceRector::class);
119+
$rectorConfig->rule(EmptyOnNullableObjectToInstanceOfRector::class);
120+
$rectorConfig->rule(DisallowedEmptyRuleFixerRector::class);
113121
$rectorConfig
114122
->ruleWithConfiguration(TypedPropertyFromAssignsRector::class, [
115123
/**
116-
* 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
124+
* The INLINE_PUBLIC value is default to false to avoid BC break,
125+
* if you use for libraries and want to preserve BC break, you don't
126+
* need to configure it, as it included in LevelSetList::UP_TO_PHP_74
117127
* Set to true for projects that allow BC break
118128
*/
119129
TypedPropertyFromAssignsRector::INLINE_PUBLIC => false,

0 commit comments

Comments
 (0)