-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
43 lines (36 loc) · 1.74 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
<?php
declare(strict_types=1);
use Rector\Set\ValueObject\SetList;
use Rector\Config\RectorConfig;
return static function (RectorConfig $rectorConfigurator): void {
// get parameters
//$parameters = $containerConfigurator->parameters();
// Define what rule sets will be applied
// here we can define, what sets of rules will be applied
// tip: use "SetList" class to autocomplete sets
$rectorConfigurator->import(SetList::PHP_52);
$rectorConfigurator->import(SetList::PHP_53);
$rectorConfigurator->import(SetList::PHP_54);
$rectorConfigurator->import(SetList::PHP_55);
$rectorConfigurator->import(SetList::PHP_56);
$rectorConfigurator->import(SetList::PHP_70);
$rectorConfigurator->import(SetList::PHP_71);
$rectorConfigurator->import(SetList::PHP_72);
$rectorConfigurator->import(SetList::PHP_73);
$rectorConfigurator->import(SetList::PHP_74);
$rectorConfigurator->import(SetList::PHP_80);
$rectorConfigurator->import(SetList::PHP_81);
$rectorConfigurator->import(SetList::CODE_QUALITY);
$rectorConfigurator->import(SetList::CODING_STYLE);
$rectorConfigurator->import(SetList::DEAD_CODE);
//$rectorConfigurator->import(SetList::PSR_4);
$rectorConfigurator->import(SetList::TYPE_DECLARATION);
$skipables = [
\Rector\CodeQuality\Rector\If_\ShortenElseIfRector::class,
\Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector::class,
\Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector::class,
\Rector\DeadCode\Rector\PropertyProperty\RemoveNullPropertyInitializationRector::class,
\Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector::class,
];
$rectorConfigurator->skip($skipables);
};