-
Notifications
You must be signed in to change notification settings - Fork 16
/
rector.php
67 lines (58 loc) · 1.89 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 the TYPO3 project.
*
* (c) 2019-2024 Benni Mack
* Simon Gilli
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*
* The TYPO3 project - inspiring people to share!
*/
use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\DowngradeLevelSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Symfony\Set\SymfonyLevelSetList;
use Rector\Symfony\Set\SymfonySetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$rectorConfig->skip([
__DIR__ . '/tests/Console/Style/SimpleStyle.php',
__DIR__ . '/tests/Unit/Fixtures',
FinalizeClassesWithoutChildrenRector::class => [
__DIR__ . '/src/CsFixerConfig.php',
],
]);
// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_81,
DowngradeLevelSetList::DOWN_TO_PHP_81,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::NAMING,
SetList::PRIVATIZATION,
SetList::PSR_4,
SetList::TYPE_DECLARATION,
SetList::EARLY_RETURN,
// Symfony rules
SymfonyLevelSetList::UP_TO_SYMFONY_50,
SymfonySetList::SYMFONY_CODE_QUALITY,
// PHPUnit rules
PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::PHPUNIT_EXCEPTION,
PHPUnitSetList::REMOVE_MOCKS,
PHPUnitSetList::PHPUNIT_SPECIFIC_METHOD,
PHPUnitSetList::PHPUNIT_YIELD_DATA_PROVIDER,
]);
};