forked from auraphp/Aura.SqlSchema
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
49 lines (42 loc) · 2.1 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
<?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::TYPE_DECLARATION);
$rectorConfigurator->import(\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90);
$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,
\Rector\CodeQuality\Rector\If_\CompleteMissingIfElseBracketRector::class,
\Rector\Php54\Rector\Array_\LongArrayToShortArrayRector::class,
\Rector\DeadCode\Rector\Concat\RemoveConcatAutocastRector::class,
\Rector\PHPUnit\Set\PHPUnitSetList::PHPUNIT_90 => [
__DIR__ . '/src/*.php'
],
];
$rectorConfigurator->skip($skipables);
};