-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathrector.php
More file actions
53 lines (50 loc) · 1.86 KB
/
rector.php
File metadata and controls
53 lines (50 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Symfony\CodeQuality\Rector\Class_\ControllerMethodInjectionToConstructorRector;
use Rector\Symfony\Configs\Rector\Closure\FromServicePublicToDefaultsPublicRector;
use Rector\Symfony\Configs\Rector\Closure\ServiceTagsToDefaultsAutoconfigureRector;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\TwigSetList;
return RectorConfig::configure()
->withCache('./tools/rector/var/cache/bundle', FileCacheStorage::class)
->withPaths([
__DIR__ . '/config',
__DIR__ . '/src',
__DIR__ . '/tests/src',
])
->withImportNames(importShortClasses: false, removeUnusedImports: true)
->withParallel(120, 4, 16)
->withPhpSets()
->withPreparedSets(
codeQuality: true,
deadCode: true,
codingStyle: true,
earlyReturn: false,
naming: false,
typeDeclarations: true,
)
->withSets([
DoctrineSetList::DOCTRINE_CODE_QUALITY,
SymfonySetList::CONFIGS,
SymfonySetList::SYMFONY_70,
SymfonySetList::SYMFONY_71,
SymfonySetList::SYMFONY_72,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
TwigSetList::TWIG_UNDERSCORE_TO_NAMESPACE,
])
->withSkip([
RemoveAlwaysTrueIfConditionRector::class => [
__DIR__ . '/tests/src/Twig/Component/PictureTest.php',
],
ControllerMethodInjectionToConstructorRector::class => [
__DIR__ . '/src/Bridge/EasyAdmin/src/Controller/MediaAdminController.php',
],
ServiceTagsToDefaultsAutoconfigureRector::class,
FromServicePublicToDefaultsPublicRector::class,
])
;