-
Notifications
You must be signed in to change notification settings - Fork 1
/
rector.php
47 lines (37 loc) · 1.84 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
<?php
declare(strict_types=1);
use Rector\Set\ValueObject\SetList;
use Rector\Config\RectorConfig;
return static function (RectorConfig $containerConfigurator): void {
// Define what rule sets will be applied
$containerConfigurator->import(SetList::PHP_52);
$containerConfigurator->import(SetList::PHP_53);
$containerConfigurator->import(SetList::PHP_54);
$containerConfigurator->import(SetList::PHP_55);
$containerConfigurator->import(SetList::PHP_56);
$containerConfigurator->import(SetList::PHP_70);
$containerConfigurator->import(SetList::PHP_71);
$containerConfigurator->import(SetList::PHP_72);
$containerConfigurator->import(SetList::PHP_73);
$containerConfigurator->import(SetList::PHP_74);
$containerConfigurator->import(SetList::PHP_80);
$containerConfigurator->import(SetList::PHP_81);
//$containerConfigurator->import(SetList::PSR_4);
$containerConfigurator->import(SetList::DEAD_CODE);
$containerConfigurator->import(SetList::CODE_QUALITY);
$containerConfigurator->import(SetList::TYPE_DECLARATION);
$containerConfigurator->skip([
//\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
\Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector::class,
\Rector\TypeDeclaration\Rector\ClassMethod\ReturnUnionTypeRector::class,
]);
// get parameters
//$parameters = $containerConfigurator->parameters();
// register a single rule
//$services = $containerConfigurator->services();
//$services->set(TypedPropertyRector::class);
// get services (needed for register a single rule)
//$services = $containerConfigurator->services();
//TODO:PHP8 comment once PHP 8 becomes minimum version
//$services->remove(Rector\DeadCode\Rector\ClassMethod\RemoveUnusedPromotedPropertyRector::class);
};