-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
60 lines (56 loc) · 1.73 KB
/
rector.php
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
<?php
/*
* This file is part of the Calculation package.
*
* (c) bibi.nu <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;
use Rector\Symfony\Set\TwigSetList;
return RectorConfig::configure()
->withCache(__DIR__ . '/var/cache/rector')
->withRootFiles()
->withPaths([
__DIR__ . '/config',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/public',
])->withSkip([
PreferPHPUnitThisCallRector::class,
])->withSets([
// global
SetList::PHP_82,
SetList::CODE_QUALITY,
SetList::PRIVATIZATION,
SetList::INSTANCEOF,
SetList::STRICT_BOOLEANS,
SetList::TYPE_DECLARATION,
// Doctrine
DoctrineSetList::DOCTRINE_DBAL_40,
DoctrineSetList::TYPED_COLLECTIONS,
DoctrineSetList::DOCTRINE_CODE_QUALITY,
DoctrineSetList::DOCTRINE_COLLECTION_22,
// PHP-Unit
PHPUnitSetList::PHPUNIT_110,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
// Symfony
SymfonySetList::SYMFONY_72,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
// twig
TwigSetList::TWIG_24,
TwigSetList::TWIG_UNDERSCORE_TO_NAMESPACE,
])->withAttributesSets(
// annotations to attributes
symfony: true,
doctrine: true,
phpunit: true
);