withPaths([ __DIR__ . '/app', __DIR__ . '/database', __DIR__ . '/tests', ]) ->withSkip([ __DIR__ . '/bootstrap/cache', __DIR__ . '/storage', __DIR__ . '/vendor', ]) // PHP language-level upgrades up to current target ->withPhpSets(php82: true) // Quality + safety rule sets (low-risk for adoption) ->withSets([ SetList::CODE_QUALITY, SetList::DEAD_CODE, SetList::EARLY_RETURN, SetList::TYPE_DECLARATION, SetList::PRIVATIZATION, ]) // Laravel-specific rule sets ->withSets([ LaravelSetList::LARAVEL_CODE_QUALITY, LaravelSetList::LARAVEL_COLLECTION, ]) ->withCache( cacheDirectory: __DIR__ . '/storage/app/rector-cache', );