forked from contao/contao
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
67 lines (63 loc) · 2.26 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
61
62
63
64
65
66
67
<?php
declare(strict_types=1);
/*
* This file is part of Contao.
*
* (c) Leo Feyer
*
* @license LGPL-3.0-or-later
*/
use Contao\Rector\Set\SetList;
use Rector\CodeQuality\Rector\If_\SimplifyIfReturnBoolRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
use Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector;
return RectorConfig::configure()
->withSets([SetList::CONTAO])
->withPaths([
__DIR__.'/calendar-bundle/src',
__DIR__.'/calendar-bundle/tests',
__DIR__.'/comments-bundle/src',
__DIR__.'/comments-bundle/tests',
__DIR__.'/core-bundle/src',
__DIR__.'/core-bundle/tests',
__DIR__.'/faq-bundle/src',
__DIR__.'/faq-bundle/tests',
__DIR__.'/listing-bundle/src',
__DIR__.'/maker-bundle/src',
__DIR__.'/maker-bundle/tests',
__DIR__.'/manager-bundle/bin',
__DIR__.'/manager-bundle/src',
__DIR__.'/manager-bundle/tests',
__DIR__.'/news-bundle/src',
__DIR__.'/news-bundle/tests',
__DIR__.'/newsletter-bundle/src',
__DIR__.'/newsletter-bundle/tests',
__DIR__.'/test-case/src',
__DIR__.'/vendor-bin/ecs/config',
__DIR__.'/vendor-bin/phpstan/src',
__DIR__.'/vendor-bin/service-linter/src',
])
->withSkip([
ClassPropertyAssignToConstructorPromotionRector::class => [
'*/src/Entity/*',
],
StringClassNameToClassConstantRector::class => [
'core-bundle/tests/PhpunitExtension/GlobalStateWatcher.php',
],
FirstClassCallableRector::class => [
'core-bundle/tests/Contao/InsertTagsTest.php',
'core-bundle/tests/Twig/Interop/ContaoEscaperNodeVisitorTest.php',
'core-bundle/tests/Twig/Interop/ContaoEscaperTest.php',
],
NullToStrictStringFuncCallArgRector::class,
SimplifyIfReturnBoolRector::class => [
'core-bundle/src/EventListener/CommandSchedulerListener.php',
],
])
->withRootFiles()
->withParallel()
->withCache(sys_get_temp_dir().'/rector/contao5x')
;