-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
58 lines (56 loc) · 2.42 KB
/
rector.php
File metadata and controls
58 lines (56 loc) · 2.42 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
54
55
56
57
58
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUnusedConstructorParamRector;
use Rector\Php84\Rector\MethodCall\NewMethodCallWithoutParenthesesRector;
use Rector\Privatization\Rector\Class_\FinalizeTestCaseClassRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests'
])
->withSkip([
//InlineClassRoutePrefixRector::class,
NewMethodCallWithoutParenthesesRector::class,
UnusedForeachValueToArrayKeysRector::class,
RemoveUnusedConstructorParamRector::class,
//RemoveUnusedForeachKeyRector::class,
//RemoveUselessParamTagRector::class,
// RemoveUselessReturnTagRector::class,
DeclareStrictTypesRector::class,
FinalizeTestCaseClassRector::class
//SimplifyUselessVariableRector::class
])
->withPreparedSets(
// deadCode: true,
// codeQuality: true,
codingStyle: true,
naming: true,
//privatization: true,
//typeDeclarations: true,
rectorPreset: true
)
->withPhpSets(php84: true)
->withPhpVersion(PhpVersion::PHP_84)
->withAttributesSets(symfony: true, doctrine: true)
->withComposerBased(twig: true, doctrine: true, phpunit: true, symfony: true)
->withSets(
[
LevelSetList::UP_TO_PHP_84
]
)
->withRules(
[
//ExplicitNullableParamTypeRector::class,
//AddOverrideAttributeToOverriddenMethodsRector::class,
//ReturnTypeFromStrictNativeCallRector::class
]
)
->withTypeCoverageLevel(50)
->withDeadCodeLevel(50)
->withCodeQualityLevel(50)
;