ldc-web-admin-secure-laravel/rector.php
2026-06-22 11:44:24 +02:00

52 lines
2.1 KiB
PHP

<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use RectorLaravel\Rector\Class_\CommandHiddenPropertyToHiddenAttributeRector;
use RectorLaravel\Rector\Class_\DescriptionPropertyToDescriptionAttributeRector;
use RectorLaravel\Rector\Class_\FillablePropertyToFillableAttributeRector;
use RectorLaravel\Rector\Class_\HiddenPropertyToHiddenAttributeRector;
use RectorLaravel\Rector\Class_\ModelCastsPropertyToCastsMethodRector;
use RectorLaravel\Rector\Class_\SignaturePropertyToSignatureAttributeRector;
use RectorLaravel\Rector\Class_\TablePropertyToTableAttributeRector;
use RectorLaravel\Rector\Class_\WithoutTimestampsPropertyToWithoutTimestampsAttributeRector;
use RectorLaravel\Rector\MethodCall\ValidationRuleArrayStringValueToArrayRector;
use RectorLaravel\Set\LaravelLevelSetList;
use RectorLaravel\Set\LaravelSetList;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withSetProviders(LaravelSetProvider::class)
->withPaths([
__DIR__ . '/config',
__DIR__ . '/src',
])
->withPhpSets()
->withComposerBased(laravel: true)
->withSets([
LaravelLevelSetList::UP_TO_LARAVEL_130,
LaravelSetList::LARAVEL_ARRAYACCESS_TO_METHOD_CALL,
LaravelSetList::LARAVEL_CODE_QUALITY,
LaravelSetList::LARAVEL_COLLECTION,
LaravelSetList::LARAVEL_IF_HELPERS,
LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES,
LaravelSetList::LARAVEL_TYPE_DECLARATIONS,
])
->withTypeCoverageLevel(0)
->withDeadCodeLevel(0)
->withCodeQualityLevel(0)
->withSkip([
// Disable Laravel notations.
CommandHiddenPropertyToHiddenAttributeRector::class,
DescriptionPropertyToDescriptionAttributeRector::class,
FillablePropertyToFillableAttributeRector::class,
HiddenPropertyToHiddenAttributeRector::class,
ModelCastsPropertyToCastsMethodRector::class,
SignaturePropertyToSignatureAttributeRector::class,
TablePropertyToTableAttributeRector::class,
WithoutTimestampsPropertyToWithoutTimestampsAttributeRector::class,
// Validation.
ValidationRuleArrayStringValueToArrayRector::class,
]);