2021-05-15 08:37:15 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
2022-06-05 00:39:10 +00:00
|
|
|
namespace RectorPrefix20220605;
|
2021-05-15 08:37:15 +00:00
|
|
|
|
2022-04-13 16:29:57 +00:00
|
|
|
use Rector\Config\RectorConfig;
|
2021-11-29 06:47:55 +00:00
|
|
|
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
|
|
|
|
use Rector\Set\ValueObject\LevelSetList;
|
2021-10-01 11:43:12 +00:00
|
|
|
use Rector\Set\ValueObject\SetList;
|
2022-01-04 16:28:21 +00:00
|
|
|
use Rector\Symfony\Set\SymfonySetList;
|
2022-05-27 11:51:31 +00:00
|
|
|
return static function (\Rector\Config\RectorConfig $rectorConfig) : void {
|
2022-04-20 14:29:16 +00:00
|
|
|
$rectorConfig->importNames();
|
|
|
|
$rectorConfig->paths([__DIR__ . '/src', __DIR__ . '/tests']);
|
|
|
|
$rectorConfig->parallel();
|
2022-05-27 11:51:31 +00:00
|
|
|
$rectorConfig->skip(['*/Fixture/*', '*/Source/*', '*/Source*/*', '*/tests/*/Fixture*/Expected/*', \Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => [__DIR__ . '/config'], \Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class => [
|
2022-05-22 07:17:20 +00:00
|
|
|
// "data" => "datum" false positive
|
|
|
|
__DIR__ . '/src/Rector/ClassMethod/AddRouteAnnotationRector.php',
|
2022-06-05 06:56:15 +00:00
|
|
|
], \Rector\Renaming\Rector\Name\RenameClassRector::class]);
|
2022-05-27 11:51:31 +00:00
|
|
|
$rectorConfig->ruleWithConfiguration(\Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class, [
|
2022-05-21 09:54:08 +00:00
|
|
|
'Symfony\\*',
|
|
|
|
'Twig_*',
|
|
|
|
'Swift_*',
|
|
|
|
'Doctrine\\*',
|
|
|
|
// loaded from project itself
|
|
|
|
'Psr\\Container\\ContainerInterface',
|
|
|
|
'Symfony\\Component\\Routing\\RouterInterface',
|
2022-05-21 11:58:43 +00:00
|
|
|
'Symfony\\Component\\DependencyInjection\\Container',
|
2022-05-21 09:54:08 +00:00
|
|
|
]);
|
2022-01-04 16:28:21 +00:00
|
|
|
// for testing
|
2022-04-13 16:29:57 +00:00
|
|
|
$rectorConfig->import(__DIR__ . '/config/config.php');
|
2022-05-27 11:51:31 +00:00
|
|
|
$rectorConfig->sets([\Rector\Set\ValueObject\LevelSetList::UP_TO_PHP_81, \Rector\Set\ValueObject\SetList::CODE_QUALITY, \Rector\Set\ValueObject\SetList::DEAD_CODE, \Rector\Set\ValueObject\SetList::NAMING, \Rector\Symfony\Set\SymfonySetList::SYMFONY_60]);
|
2021-05-15 08:37:15 +00:00
|
|
|
};
|