-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
54 lines (41 loc) · 1.38 KB
/
rector.php
File metadata and controls
54 lines (41 loc) · 1.38 KB
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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Symfony\Set\SymfonySetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__ . '/phar',
__DIR__ . '/src',
__DIR__ . '/tests',
]);
// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
SymfonySetList::SYMFONY_54,
SymfonySetList::SYMFONY_CODE_QUALITY,
SymfonySetList::SYMFONY_CONSTRUCTOR_INJECTION,
]);
// skip individual rules
$rectorConfig->skip([
//
// I'm skipping this because I want to make sure it's correct before
// proceeding.
//
\Rector\Php80\Rector\FunctionLike\UnionTypesRector::class,
//
// I'm skipping this because it's stupid.
//
\Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector::class,
//
// I'm skipping this because it makes the code less readable. We're
// instead relying on Symfony to do what it says it will do.
//
\Rector\Php71\Rector\FuncCall\CountOnNullRector::class,
//
// I'm skipping this for now while I review why Rector thinks casts are
// necessary here.
//
\Rector\Php81\Rector\FuncCall\NullToStrictStringFuncCallArgRector::class,
]);
};