-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
41 lines (37 loc) · 2.13 KB
/
rector.php
File metadata and controls
41 lines (37 loc) · 2.13 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 Cambis\SilverstripeRector\Set\ValueObject\SilverstripeLevelSetList;
use Cambis\SilverstripeRector\Set\ValueObject\SilverstripeSetList;
use Cambis\SilverstripeRector\Silverstripe413\Rector\Class_\AddBelongsToPropertyAndMethodAnnotationsToDataObjectRector;
use Cambis\SilverstripeRector\Silverstripe413\Rector\Class_\AddDBFieldPropertyAnnotationsToDataObjectRector;
use Cambis\SilverstripeRector\Silverstripe413\Rector\Class_\AddExtensionMixinAnnotationsToExtensibleRector;
use Cambis\SilverstripeRector\Silverstripe413\Rector\Class_\AddHasOnePropertyAndMethodAnnotationsToDataObjectRector;
use Cambis\SilverstripeRector\Silverstripe52\Rector\Class_\AddBelongsManyManyMethodAnnotationsToDataObjectRector;
use Cambis\SilverstripeRector\Silverstripe52\Rector\Class_\AddExtendsAnnotationToContentControllerRector;
use Cambis\SilverstripeRector\Silverstripe52\Rector\Class_\AddExtendsAnnotationToExtensionRector;
use Cambis\SilverstripeRector\Silverstripe52\Rector\Class_\AddHasManyMethodAnnotationsToDataObjectRector;
use Cambis\SilverstripeRector\Silverstripe52\Rector\Class_\AddManyManyMethodAnnotationsToDataObjectRector;
use Rector\Config\RectorConfig;
return RectorConfig::configure()
->withImportNames(removeUnusedImports: true)
->withPaths([
__DIR__ . '/src'
])
->withPreparedSets(deadCode: true, typeDeclarations: true)
->withPhpSets()
->withSets([
SilverstripeLevelSetList::UP_TO_SILVERSTRIPE_60,
SilverstripeSetList::CODE_QUALITY,
])
->withSkip([
// Skip the add annotation rectors
AddDBFieldPropertyAnnotationsToDataObjectRector::class,
AddBelongsToPropertyAndMethodAnnotationsToDataObjectRector::class,
AddHasOnePropertyAndMethodAnnotationsToDataObjectRector::class,
AddHasManyMethodAnnotationsToDataObjectRector::class,
AddBelongsManyManyMethodAnnotationsToDataObjectRector::class,
AddManyManyMethodAnnotationsToDataObjectRector::class,
AddExtensionMixinAnnotationsToExtensibleRector::class,
AddExtendsAnnotationToContentControllerRector::class,
AddExtendsAnnotationToExtensionRector::class,
]);