-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathrector.php
More file actions
53 lines (50 loc) · 2.45 KB
/
Copy pathrector.php
File metadata and controls
53 lines (50 loc) · 2.45 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
51
52
53
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php70\Rector\FuncCall\RandomFunctionRector;
use Rector\Php74\Rector\If_\IfToNullCoalescingAssignRector;
use Rector\Php74\Rector\Property\RestoreDefaultNullToNullableTypePropertyRector;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Php81\Rector\Property\ReadOnlyPropertyRector;
use Rector\Php84\Rector\MethodCall\NewMethodCallWithoutParenthesesRector;
use Rector\Php85\Rector\ArrayDimFetch\ArrayFirstLastRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ParamTypeByParentCallTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureNeverReturnTypeRector;
use Rector\TypeDeclaration\Rector\Closure\AddClosureVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\Closure\ClosureReturnTypeRector;
use Rector\TypeDeclaration\Rector\FuncCall\AddArrayFunctionClosureParamTypeRector;
use Rector\TypeDeclaration\Rector\FuncCall\AddArrowFunctionParamArrayWhereDimFetchRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromAssignsRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets()
->withPreparedSets(
typeDeclarations: true,
)
// Absorbing moves code: keep the source exactly as released.
->withSkip([
__DIR__ . '/tests/bench',
AddArrayFunctionClosureParamTypeRector::class,
AddArrowFunctionParamArrayWhereDimFetchRector::class,
AddArrowFunctionReturnTypeRector::class,
AddClosureNeverReturnTypeRector::class,
AddClosureVoidReturnTypeWhereNoReturnRector::class,
ArrayFirstLastRector::class,
ClassPropertyAssignToConstructorPromotionRector::class,
ClosureReturnTypeRector::class,
IfToNullCoalescingAssignRector::class,
NewMethodCallWithoutParenthesesRector::class,
ParamTypeByParentCallTypeRector::class,
RandomFunctionRector::class,
ReadOnlyPropertyRector::class,
RestoreDefaultNullToNullableTypePropertyRector::class,
StringClassNameToClassConstantRector::class,
TypedPropertyFromAssignsRector::class,
TypedPropertyFromStrictConstructorRector::class,
]);