AntCMS/rector.php

36 lines
1 KiB
PHP
Raw Permalink Normal View History

2023-01-12 08:20:13 +00:00
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\FuncCall\ConsistentPregDelimiterRector;
2023-01-12 08:20:13 +00:00
use Rector\Config\RectorConfig;
2023-01-26 06:08:19 +00:00
use Rector\DeadCode\Rector\ClassLike\RemoveAnnotationRector;
2023-01-12 08:20:13 +00:00
use Rector\Php80\Rector\FunctionLike\MixedTypeRector;
use Rector\Php80\Rector\FunctionLike\UnionTypesRector;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->skip([
__DIR__ . '/src/Vendor',
__DIR__ . '/src/Cache',
UnionTypesRector::class,
MixedTypeRector::class,
EncapsedStringsToSprintfRector::class,
ConsistentPregDelimiterRector::class,
2023-01-26 06:08:19 +00:00
RemoveAnnotationRector::class,
2023-01-12 08:20:13 +00:00
]);
$rectorConfig->sets([
SetList::PHP_80,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::NAMING,
2023-01-26 06:08:19 +00:00
SetList::DEAD_CODE,
2023-01-12 08:20:13 +00:00
]);
};