-
Notifications
You must be signed in to change notification settings - Fork 358
Expand file tree
/
Copy pathrector.php
More file actions
57 lines (53 loc) · 1.72 KB
/
rector.php
File metadata and controls
57 lines (53 loc) · 1.72 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
<?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\PHPUnit\Set\PHPUnitSetList;
use Rector\Renaming\Rector\MethodCall\RenameMethodRector;
use Rector\Renaming\ValueObject\MethodCallRename;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonySetList;
use Symfony\Component\Uid\Uuid;
return RectorConfig::configure()
->withRootFiles()
->withPaths([
__DIR__ . '/bin',
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/packages',
])
->withSkipPath('*/var/cache')
->withSkipPath('*/tests/Resources/cache')
->withSkipPath('*/node_modules')
->withPHPStanConfigs([
__DIR__ . '/phpstan.dist.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,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
])
->withRules([
StaticDataProviderClassMethodRector::class,
])
->withConfiguredRule(RenameMethodRector::class, [
new MethodCallRename(Uuid::class, '__toString', 'toRfc4122'),
])
;