forge/rector.php

43 lines
1.2 KiB
PHP
Raw Normal View History

2025-01-14 16:03:55 -05:00
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
2025-01-30 00:50:28 -05:00
use RectorLaravel\Set\LaravelSetList;
2025-01-14 16:03:55 -05:00
return RectorConfig::configure()
->withPaths([
__DIR__.'/app',
__DIR__.'/bootstrap',
__DIR__.'/config',
__DIR__.'/lang',
__DIR__.'/public',
__DIR__.'/resources',
__DIR__.'/routes',
__DIR__.'/tests',
])
2025-01-30 00:23:55 -05:00
->withSkip([
__DIR__.'*.blade.php',
__DIR__.'/bootstrap/cache',
2025-01-30 00:23:55 -05:00
])
2025-01-14 16:03:55 -05:00
->withCache(
cacheDirectory: '.rector/cache',
cacheClass: FileCacheStorage::class
)
->withPhpSets()
2025-01-30 00:50:28 -05:00
->withSets([
LaravelSetList::LARAVEL_ARRAYACCESS_TO_METHOD_CALL,
LaravelSetList::LARAVEL_CODE_QUALITY,
LaravelSetList::LARAVEL_COLLECTION,
LaravelSetList::LARAVEL_CONTAINER_STRING_TO_FULLY_QUALIFIED_NAME,
LaravelSetList::LARAVEL_ELOQUENT_MAGIC_METHOD_TO_QUERY_BUILDER,
LaravelSetList::LARAVEL_IF_HELPERS,
LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES,
])
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
2025-01-30 00:23:55 -05:00
->withImportNames(removeUnusedImports: true)
->withAttributesSets();