-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
rector.php
47 lines (44 loc) · 1.75 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Symfony\CodeQuality\Rector\MethodCall\LiteralGetToRequestClassConstantRector;
return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
__DIR__.'/config',
__DIR__.'/tests',
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
earlyReturn: true,
)
->withPhpSets(php83: true)
->withImportNames(importShortClasses: false, removeUnusedImports: true)
->withSkip([
LiteralGetToRequestClassConstantRector::class,
ClosureToArrowFunctionRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
SimplifyBoolIdenticalTrueRector::class,
ClassPropertyAssignToConstructorPromotionRector::class => [
__DIR__.'/src/Entity',
],
FirstClassCallableRector::class => [
__DIR__.'/config',
],
CallableThisArrayToAnonymousFunctionRector::class => [
__DIR__.'/config',
],
AddOverrideAttributeToOverriddenMethodsRector::class,
]
)
->withSkipPath(__DIR__.'/config/bundles.php');