mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
45 lines
1.5 KiB
PHP
45 lines
1.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
|
|
use Rector\Config\RectorConfig;
|
|
use Rector\Set\ValueObject\LevelSetList;
|
|
|
|
return static function (RectorConfig $rectorConfig): void {
|
|
$rectorConfig->paths([
|
|
__DIR__ . '/docs',
|
|
__DIR__ . '/src',
|
|
]);
|
|
|
|
$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/testsApp_KernelDevDebugContainer.xml');
|
|
|
|
//$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class);
|
|
//$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector');
|
|
|
|
// register a single rule
|
|
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class);
|
|
$rectorConfig->disableParallel();
|
|
|
|
//define sets of rules
|
|
$rectorConfig->sets([
|
|
LevelSetList::UP_TO_PHP_82,
|
|
\Rector\Symfony\Set\SymfonyLevelSetList::UP_TO_SYMFONY_44,
|
|
]);
|
|
|
|
// chill rules
|
|
//$rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class);
|
|
|
|
// skip some path...
|
|
$rectorConfig->skip([
|
|
// make rector stuck for some files
|
|
\Rector\Php56\Rector\FunctionLike\AddDefaultValueForUndefinedVariableRector::class,
|
|
|
|
// we need to discuss this: are we going to have FALSE in tests instead of an error ?
|
|
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
|
|
|
|
// must merge MR500 and review a typing of "ArrayCollection" in entities
|
|
\Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector::class,
|
|
]);
|
|
};
|