-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
80 lines (73 loc) · 2.46 KB
/
Copy pathrector.php
File metadata and controls
80 lines (73 loc) · 2.46 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?php
declare(strict_types=1);
/*
* This file is part of SolidShift project.
*
* (c) Pierre du Plessis <open-source@solidworx.co>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([__DIR__ . '/src'])
->withImportNames(importNames: true, importDocBlockNames: true, importShortClasses: true, removeUnusedImports: true)
->withPhpVersion(PhpVersion::PHP_84)
->withSkip([
RemoveAlwaysTrueIfConditionRector::class => [
__DIR__ . '/src/Security/Voter/UserSiteAccessVoter.php',
],
AnnotationToAttributeRector::class => [
__DIR__ . '/src/Entity/Site.php',
__DIR__ . '/src/Entity/User.php',
__DIR__ . '/src/Entity/UserSiteAccess.php',
],
ClassPropertyAssignToConstructorPromotionRector::class => [
__DIR__ . '/src/Entity/*.php',
],
])
->withComposerBased(
twig: true,
doctrine: true,
phpunit: true,
symfony: true,
)
->withAttributesSets(symfony: true)
->withPhpSets()
->withPreparedSets(symfonyConfigs: true)
->withSets([
// General
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::INSTANCEOF,
SetList::PHP_84,
SetList::STRICT_BOOLEANS,
SetList::TYPE_DECLARATION,
SetList::PRIVATIZATION,
SetList::CARBON,
// PHP
LevelSetList::UP_TO_PHP_84,
// PHPUnit
PHPUnitSetList::PHPUNIT_90,
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_110,
PHPUnitSetList::PHPUNIT_120,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
// Doctrine
DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::TYPED_COLLECTIONS,
DoctrineSetList::ANNOTATIONS_TO_ATTRIBUTES,
DoctrineSetList::GEDMO_ANNOTATIONS_TO_ATTRIBUTES,
])
;