-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
executable file
·56 lines (52 loc) · 1.58 KB
/
Copy pathrector.php
File metadata and controls
executable file
·56 lines (52 loc) · 1.58 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\ClassMethod\RemoveUselessReturnTagRector;
use Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
$paths = [
__DIR__.'/src',
__DIR__.'/.php-cs-fixer.dist.php',
__DIR__.'/rector.php',
];
return RectorConfig::configure()
->withImportNames(removeUnusedImports: true)
->withPhpSets(php83: true)
->withParallel()
->withPaths($paths)
->withRootFiles()
->withSymfonyContainerPhp(__DIR__.'/tests/symfonyContainer.php')
->withComposerBased(
twig: true,
doctrine: true,
phpunit: true
)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
instanceOf: true,
earlyReturn: true,
doctrineCodeQuality: true,
symfonyCodeQuality: true,
// symfonyConfigs: true
)
->withAttributesSets(
symfony: true,
doctrine: true,
phpunit: true,
)
->withRules([
DeclareStrictTypesRector::class,
])
->withSkip([
NullToStrictStringFuncCallArgRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
RemoveUselessReturnTagRector::class,
RemoveNonExistingVarAnnotationRector::class,
])
;