-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
41 lines (38 loc) · 1.39 KB
/
rector.php
File metadata and controls
41 lines (38 loc) · 1.39 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Netwerkstatt\SilverstripeRector\Set\SilverstripeSetList;
use Rector\CodingStyle\Rector\Stmt\NewlineAfterStatementRector;
use Netwerkstatt\SilverstripeRector\Set\SilverstripeLevelSetList;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\ClassMethod\NewlineBeforeNewAssignSetRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Netwerkstatt\SilverstripeRector\Rector\Misc\RenameAddFieldsToTabWithoutArrayParamRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/deploy',
__DIR__ . '/public',
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: false,
instanceOf: true,
earlyReturn: true,
rectorPreset: true,
)
->withPhpSets() // automatically gets the PHP version from composer.json
->withSets([
// silverstripe rector
SilverstripeSetList::CODE_STYLE,
SilverstripeLevelSetList::UP_TO_SS_6_0,
])
->withSkip([
NewlineBeforeNewAssignSetRector::class,
NewlineAfterStatementRector::class,
DeclareStrictTypesRector::class,
EncapsedStringsToSprintfRector::class,
RenameAddFieldsToTabWithoutArrayParamRector::class,
]);