-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
51 lines (45 loc) · 1.72 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Assign\SplitListAssignToSeparateLineRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
use Rector\Naming\Rector\ClassMethod\RenameParamToMatchTypeRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->sets([
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::NAMING,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
LevelSetList::UP_TO_PHP_82,
PHPUnitLevelSetList::UP_TO_PHPUNIT_100,
]);
$rectorConfig->skip([
ChangeAndIfToEarlyReturnRector::class => [
'app/Handlers/ExceptionHandler.php',
],
EncapsedStringsToSprintfRector::class,
FinalizeClassesWithoutChildrenRector::class,
RenameParamToMatchTypeRector::class,
RenamePropertyToMatchTypeRector::class,
SplitListAssignToSeparateLineRector::class,
WrapEncapsedVariableInCurlyBracesRector::class,
]);
$rectorConfig->importNames();
$rectorConfig->importShortClasses();
$rectorConfig->paths([
__DIR__.'/app',
__DIR__.'/public/index.php',
__DIR__.'/tests',
__DIR__.'/rector.php',
]);
};