diff --git a/composer.json b/composer.json index 68da3a3..7fa4bcb 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ } }, "scripts": { - "fix": [ + "lint": [ "rector", "ecs --fix", "ecs --fix" diff --git a/config/rector.php b/config/rector.php index 82d5ac5..f32142d 100644 --- a/config/rector.php +++ b/config/rector.php @@ -24,7 +24,6 @@ use Rector\EarlyReturn\Rector\Return_\PreparedValueToEarlyReturnRector; use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector; use Rector\EarlyReturn\Rector\StmtsAwareInterface\ReturnEarlyIfVariableRector; use Rector\Php80\Rector\ClassConstFetch\ClassOnThisVariableObjectRector; -use Rector\Set\ValueObject\LevelSetList; use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\AddMethodCallBasedStrictParamTypeRector; use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeFromPropertyTypeRector; @@ -44,7 +43,14 @@ use Rector\TypeDeclaration\Rector\FunctionLike\AddReturnTypeDeclarationFromYield use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector; return RectorConfig::configure() - ->withSets([LevelSetList::UP_TO_PHP_83]) + ->withPhpSets(php83: true) + ->withPreparedSets( + deadCode: true, + codeQuality: true, + typeDeclarations: true, + earlyReturn: true, + strictBooleans: true, + ) ->withRules([ AddArrowFunctionReturnTypeRector::class, AddMethodCallBasedStrictParamTypeRector::class,