-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
51 lines (48 loc) · 2.02 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
49
50
51
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Php82\Rector\Class_\ReadOnlyClassRector;
use Rector\Php83\Rector\ClassConst\AddTypeToConstRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
return RectorConfig::configure()
->withCache(__DIR__.'/var/rector-cache')
->withPaths([
__DIR__.'/src',
__DIR__.'/tests',
])
->withRootFiles()
->withImportNames(importShortClasses: false, removeUnusedImports: true)
->withPhpSets()
->withAttributesSets()
->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true)
->withPreparedSets(
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
)
->withSkip([
'tests/Fixtures/Messenger/envelope_compressed.php',
'tests/Fixtures/Messenger/envelope_uncompressed.php',
NullToStrictStringFuncCallArgRector::class,
LocallyCalledStaticMethodToNonStaticRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
ExplicitBoolCompareRector::class,
UnusedForeachValueToArrayKeysRector::class,
AddOverrideAttributeToOverriddenMethodsRector::class,
ReadOnlyClassRector::class,
AddTypeToConstRector::class,
NewlineAfterStatementRector::class,
CatchExceptionNameMatchingTypeRector::class,
SplitDoubleAssignRector::class,
])
;