forked from keepsuit/laravel-temporal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
58 lines (52 loc) · 2.29 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\CodingStyle\Rector\ArrowFunction\StaticArrowFunctionRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\Core\ValueObject\PhpVersion;
use Rector\DeadCode\Rector\PropertyProperty\RemoveNullPropertyInitializationRector;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
use Rector\Php73\Rector\FuncCall\JsonThrowOnErrorRector;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector;
use RectorLaravel\Set\LaravelLevelSetList;
return static function (RectorConfig $config): void {
$config->phpVersion(PhpVersion::PHP_81);
$config->paths([
__DIR__.'/src',
__DIR__.'/config',
]);
$config->sets([
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
SetList::EARLY_RETURN,
SetList::PRIVATIZATION,
SetList::TYPE_DECLARATION,
LevelSetList::UP_TO_PHP_81,
LaravelLevelSetList::UP_TO_LARAVEL_90,
]);
$config->skip([
AddArrowFunctionReturnTypeRector::class,
CallableThisArrayToAnonymousFunctionRector::class,
FinalizeClassesWithoutChildrenRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
JsonThrowOnErrorRector::class,
PostIncDecToPreIncDecRector::class,
RemoveNullPropertyInitializationRector::class,
ReturnBinaryOrToEarlyReturnRector::class,
ReturnTypeFromReturnDirectArrayRector::class,
ReturnTypeFromReturnNewRector::class,
ReturnTypeFromStrictTypedCallRector::class,
StaticArrowFunctionRector::class,
StaticClosureRector::class,
]);
};