withPaths([__DIR__ . '/app', __DIR__ . '/modules', __DIR__ . '/tests', __DIR__ . '/public']) ->withBootstrapFiles([__DIR__ . '/vendor/codeigniter4/framework/system/Test/bootstrap.php']) ->withPhpVersion(PhpVersion::PHP_81) ->withPhpSets(php81: true) ->withPreparedSets( typeDeclarations: true, codeQuality: true, codingStyle: true, earlyReturn: true, deadCode: true, ) ->withImportNames(true, true, true, true) ->withSkip([ // .mp3 files were somehow processed by rector, so skip all media files __DIR__ . '/public/media/*', __DIR__ . '/app/Views/errors/*', // skip specific generated files __DIR__ . '/modules/Admin/Language/*/PersonsTaxonomy.php', // skip rules from used sets ChangeOrIfContinueToMultiContinueRector::class, EncapsedStringsToSprintfRector::class, RemoveExtraParametersRector::class, UnwrapFutureCompatibleIfPhpVersionRector::class, ExplicitReturnNullRector::class, // skip rule in specific directory StringClassNameToClassConstantRector::class => [ __DIR__ . '/app/Language/*', __DIR__ . '/modules/*/Language/*', ], SymplifyQuoteEscapeRector::class => [__DIR__ . '/app/Language/*', __DIR__ . '/modules/*/Language/*'], NewlineAfterStatementRector::class => [__DIR__ . '/app/Views'], RemoveUnreachableStatementRector::class => [ __DIR__ . '/modules/Install/Controllers/InstallController.php', ], ChangeAndIfToEarlyReturnRector::class => [__DIR__ . '/modules/Install/Controllers/InstallController.php'], ]) ->withPHPStanConfigs([__DIR__ . '/phpstan.neon', 'vendor/codeigniter/phpstan-codeigniter/extension.neon']);