-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrector.php
More file actions
52 lines (50 loc) · 2.01 KB
/
rector.php
File metadata and controls
52 lines (50 loc) · 2.01 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
<?php declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessParamTagRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
return RectorConfig::configure()
->withCache('.cache/rector')
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withSkip([
__DIR__ . '/tests/Rules/stubs',
__DIR__ . '/tests/Rules/Debug/stubs',
AddArrowFunctionReturnTypeRector::class,
EncapsedStringsToSprintfRector::class,
ExplicitBoolCompareRector::class,
InlineArrayReturnAssignRector::class,
NullToStrictStringFuncCallArgRector::class,
PrivatizeFinalClassMethodRector::class,
RemoveUselessParamTagRector::class,
RemoveUselessReturnTagRector::class,
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
privatization: true,
instanceOf: true,
earlyReturn: true,
rectorPreset: true,
phpunitCodeQuality: true,
)
->withAttributesSets()
->withConfiguredRule(AddOverrideAttributeToOverriddenMethodsRector::class, [
AddOverrideAttributeToOverriddenMethodsRector::ADD_TO_INTERFACE_METHODS => true,
])
->withImportNames()
->withEditorUrl('phpstorm://open?file=%file%&line=%line%')
->withParallel(300, 15, 15)
->withMemoryLimit('3G')
->withPhpSets(php83: true);