-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathrector.php
More file actions
48 lines (45 loc) · 1.91 KB
/
rector.php
File metadata and controls
48 lines (45 loc) · 1.91 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
<?php
/** @noinspection DevelopmentDependenciesUsageInspection */
use Rector\CodeQuality\Rector\ClassMethod\LocallyCalledStaticMethodToNonStaticRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodingStyle\Rector\Assign\SplitDoubleAssignRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
return RectorConfig::configure()
->withPaths([
__DIR__.'/migrations',
__DIR__.'/src',
__DIR__.'/tests',
])
->withImportNames()
->withSkip([
LocallyCalledStaticMethodToNonStaticRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
DisallowedEmptyRuleFixerRector::class,
NewlineAfterStatementRector::class,
EncapsedStringsToSprintfRector::class,
WrapEncapsedVariableInCurlyBracesRector::class,
NewlineBeforeNewAssignSetRector::class,
CatchExceptionNameMatchingTypeRector::class,
SplitDoubleAssignRector::class,
PreferPHPUnitThisCallRector::class,
DeclareStrictTypesRector::class,
])
// here we can define, what prepared sets of rules will be applied
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
privatization: true,
rectorPreset: true,
phpunitCodeQuality: true,
symfonyCodeQuality: true,
)
->withPhpSets();