withPaths([ __DIR__.'/app', __DIR__.'/bootstrap', __DIR__.'/config', __DIR__.'/database', __DIR__.'/public', __DIR__.'/routes', __DIR__.'/tests', ]) ->withRootFiles() ->withSkip([ __DIR__.'/bootstrap/cache', AddOverrideAttributeToOverriddenMethodsRector::class, NewlineBetweenClassLikeStmtsRector::class, ]) ->withCache(__DIR__.'/storage/rector', FileCacheStorage::class) ->withPhpSets() ->withAttributesSets() ->withPreparedSets( deadCode: true, codeQuality: true, codingStyle: true, typeDeclarations: true, typeDeclarationDocblocks: true, privatization: true, instanceOf: true, earlyReturn: true, carbon: true, rectorPreset: true, ) ->withSetProviders(LaravelSetProvider::class) ->withComposerBased(laravel: true) ->withSets([ LaravelSetList::LARAVEL_ARRAYACCESS_TO_METHOD_CALL, LaravelSetList::LARAVEL_ARRAY_STR_FUNCTION_TO_STATIC_CALL, LaravelSetList::LARAVEL_CODE_QUALITY, LaravelSetList::LARAVEL_COLLECTION, LaravelSetList::LARAVEL_CONTAINER_STRING_TO_FULLY_QUALIFIED_NAME, LaravelSetList::LARAVEL_FACADE_ALIASES_TO_FULL_NAMES, LaravelSetList::LARAVEL_FACTORIES, LaravelSetList::LARAVEL_IF_HELPERS, LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES, LaravelSetList::LARAVEL_TESTING, LaravelSetList::LARAVEL_TYPE_DECLARATIONS, ]) ->withRules([ // Core Rector Rules SequentialAssignmentsToPipeOperatorRector::class, NestedFuncCallsToPipeOperatorRector::class, MbStrContainsRector::class, // Laravel Rector Rules EmptyToBlankAndFilledFuncRector::class, ConfigToTypedConfigMethodCallRector::class, RemoveModelPropertyFromFactoriesRector::class, RequestStaticValidateToInjectRector::class, ]) ->withConfiguredRule(RemoveDumpDataDeadCodeRector::class, [ 'dd', 'ddd', 'dump', 'ray', ]) ->withConfiguredRule(WhereToWhereLikeRector::class, [ WhereToWhereLikeRector::USING_POSTGRES_DRIVER => true, ]);