-
-
Notifications
You must be signed in to change notification settings - Fork 63
/
rector.php
48 lines (45 loc) · 1.77 KB
/
rector.php
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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\String_\UseClassKeywordForClassNameResolutionRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/config',
__DIR__ . '/rules',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/bin',
__DIR__ . '/utils',
])
->withPHPStanConfigs([__DIR__ . '/phpstan.neon'])
->withImportNames(true, true, false, true)
->withSkip([
RemoveUnusedVariableAssignRector::class,
__DIR__ . '/utils/generator/templates',
StringClassNameToClassConstantRector::class,
__DIR__ . '/src/Set',
UseClassKeywordForClassNameResolutionRector::class => [
__DIR__ . '/rules/TYPO311/v0/ForwardResponseInsteadOfForwardMethodRector.php', // Don't import TYPO3 namespace
__DIR__ . '/rules/TYPO310/v0/UseNativePhpHex2binMethodRector.php', // Don't import TYPO3 namespace
__DIR__ . '/rules/TYPO312/v0/MigrateFetchAllToFetchAllAssociativeRector.php', // Don't replace Doctrine Constants
__DIR__ . '/rules/TYPO312/v0/MigrateFetchToFetchAssociativeRector.php', // Don't replace Doctrine Constants
],
// tests
'*/Fixture/*',
'*/Fixture*',
'*/Source/*',
'*/Source*',
'*/Expected/*',
__DIR__ . '/tests/Rector/CodeQuality/General/',
])
->withSets([
LevelSetList::UP_TO_PHP_74,
SetList::PRIVATIZATION,
SetList::CODING_STYLE,
SetList::CODE_QUALITY,
SetList::DEAD_CODE,
]);