-
Notifications
You must be signed in to change notification settings - Fork 0
/
rector.php
42 lines (34 loc) · 1.22 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php70\Rector\MethodCall\ThisCallOnStaticMethodToStaticCallRector;
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php74\Rector\Property\TypedPropertyRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Transform\Rector\ClassMethod\ReturnTypeWillChangeRector;
return static function (RectorConfig $config): void {
# Options
$config->paths([
__DIR__ . '/src',
__DIR__ . '/tests',
]);
$config->importNames();
# Sets
$config->sets([LevelSetList::UP_TO_PHP_74]);
# Remove from sets
$config->skip([
AddDefaultValueForUndefinedVariableRector::class,
AddLiteralSeparatorToNumberRector::class,
CountOnNullRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
ThisCallOnStaticMethodToStaticCallRector::class,
]);
# PHP Rules
$config->ruleWithConfiguration(ReturnTypeWillChangeRector::class, [
// classes
]);
$config->ruleWithConfiguration(TypedPropertyRector::class, [
TypedPropertyRector::INLINE_PUBLIC => true
]);
};