-
-
Notifications
You must be signed in to change notification settings - Fork 763
/
rector.php
38 lines (35 loc) · 1.76 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\OptionalParametersAfterRequiredRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\If_\NullableCompareToNullRector;
use Rector\CodingStyle\Rector\Plus\UseIncrementAssignRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
return RectorConfig::configure()
->withPaths(['config', 'resources', 'src'])
->withPhpSets(php81: true)
->withPreparedSets(deadCode: true, codingStyle: true, typeDeclarations: true)
->withSkip([
ReturnNeverTypeRector::class,
OptionalParametersAfterRequiredRector::class,
ClosureToArrowFunctionRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
ExplicitBoolCompareRector::class,
EncapsedStringsToSprintfRector::class,
StaticClosureRector::class,
StaticArrowFunctionRector::class,
UseIncrementAssignRector::class,
PostIncDecToPreIncDecRector::class,
NullableCompareToNullRector::class,
AddArrowFunctionReturnTypeRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
]);