-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrector.php
More file actions
44 lines (41 loc) · 2.35 KB
/
Copy pathrector.php
File metadata and controls
44 lines (41 loc) · 2.35 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
<?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;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
return RectorConfig::configure()
->withImportNames(removeUnusedImports: true)
->withPaths([
__DIR__ . '/_config.php',
__DIR__ . '/src',
])
->withPhpSets()
->withSets([
SilverstripeLevelSetList::UP_TO_SILVERSTRIPE_60,
SilverstripeSetList::CODE_QUALITY,
])
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
ClosureToArrowFunctionRector::class,
// Skip the add annotation rectors
AddDBFieldPropertyAnnotationsToDataObjectRector::class,
AddBelongsToPropertyAndMethodAnnotationsToDataObjectRector::class,
AddHasOnePropertyAndMethodAnnotationsToDataObjectRector::class,
AddHasManyMethodAnnotationsToDataObjectRector::class,
AddBelongsManyManyMethodAnnotationsToDataObjectRector::class,
AddManyManyMethodAnnotationsToDataObjectRector::class,
AddExtensionMixinAnnotationsToExtensibleRector::class,
AddExtendsAnnotationToContentControllerRector::class,
AddExtendsAnnotationToExtensionRector::class,
]);