-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
36 lines (30 loc) · 1.01 KB
/
Copy pathrector.php
File metadata and controls
36 lines (30 loc) · 1.01 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\ValueObject\PhpVersion;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
// define paths where to process...
]);
$rectorConfig->bootstrapFiles([
]);
$rectorConfig->phpVersion(
PhpVersion::PHP_82,
);
// define sets of rules
$rectorConfig->sets([
LevelSetList::UP_TO_PHP_82,
SetList::CODE_QUALITY,
SetList::EARLY_RETURN,
SetList::DEAD_CODE,
]);
$rectorConfig->skip([
// skip var annotation rule since it flags where we use it to coerce variable types
Rector\CodeQuality\Rector\If_\CombineIfRector::class,
Rector\Php81\Rector\Array_\FirstClassCallableRector::class,
Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector::class,
Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector::class,
]);
};