-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrector.php
More file actions
50 lines (47 loc) · 1.82 KB
/
rector.php
File metadata and controls
50 lines (47 loc) · 1.82 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
<?php
declare(strict_types=1);
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
use Rector\Config\RectorConfig;
use Rector\Php70\Rector\StaticCall\StaticCallOnNonStaticToInstanceCallRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php81\Rector\Array_\ArrayToFirstClassCallableRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\Closure\ClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
return RectorConfig::configure()
->withCache('./.cache/rector', FileCacheStorage::class)
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets(php84: true)
->withSets([
PHPUnitSetList::PHPUNIT_120,
])
->withRules([
DeclareStrictTypesRector::class,
])
->withPreparedSets(
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
phpunitCodeQuality: true,
)
->withSkip([
AddArrowFunctionReturnTypeRector::class,
ClosureReturnTypeRector::class,
ClosureToArrowFunctionRector::class,
EncapsedStringsToSprintfRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
StaticCallOnNonStaticToInstanceCallRector::class,
NullableCompareToNullRector::class,
ExplicitBoolCompareRector::class,
ArrayToFirstClassCallableRector::class,
]);