forked from sulu/sulu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
47 lines (43 loc) · 1.36 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
<?php
declare(strict_types=1);
/*
* This file is part of Sulu.
*
* (c) Sulu GmbH
*
* 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\Doctrine\Set\DoctrineSetList;
use Rector\PHPUnit\PHPUnit100\Rector\Class_\StaticDataProviderClassMethodRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;
return RectorConfig::configure()
->withRootFiles()
->withPaths([
__DIR__ . '/bin',
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withSkipPath('*/var/cache')
->withSkipPath('*/tests/Resources/cache')
->withSkipPath('*/node_modules')
->withPHPStanConfigs([
__DIR__ . '/phpstan.neon',
])
->withSymfonyContainerXml(__DIR__ . '/var/cache/admin/dev/App_KernelDevDebugContainer.xml')
// ->withImportNames(importShortClasses: false)
->withSets([
// Currently disabled as code is not typed enough:
// SetList::CODE_QUALITY,
// SymfonySetList::SYMFONY_CODE_QUALITY,
// DoctrineSetList::DOCTRINE_CODE_QUALITY,
// LevelSetList::UP_TO_PHP_80,
])
->withRules([
StaticDataProviderClassMethodRector::class, // prepare for PHPUnit >= 10
]);