-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
74 lines (71 loc) · 2.71 KB
/
Copy pathrector.php
File metadata and controls
74 lines (71 loc) · 2.71 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Enum_\EnumCaseToPascalCaseRector;
use Rector\Config\RectorConfig;
use RectorLaravel\Rector\ArrayDimFetch\ArrayToArrGetRector;
use RectorLaravel\Rector\Class_\RemoveModelPropertyFromFactoriesRector;
use RectorLaravel\Rector\Class_\UseForwardsCallsTraitRector;
use RectorLaravel\Rector\Empty_\EmptyToBlankAndFilledFuncRector;
use RectorLaravel\Rector\FuncCall\ConfigToTypedConfigMethodCallRector;
use RectorLaravel\Rector\FuncCall\RemoveDumpDataDeadCodeRector;
use RectorLaravel\Rector\MethodCall\ResponseHelperCallToJsonResponseRector;
use RectorLaravel\Rector\MethodCall\UseComponentPropertyWithinCommandsRector;
use RectorLaravel\Rector\MethodCall\WhereToWhereLikeRector;
use RectorLaravel\Rector\StaticCall\RouteActionCallableRector;
use RectorLaravel\Set\LaravelSetList;
use RectorLaravel\Set\LaravelSetProvider;
use RectorLaravel\Set\Packages\Faker\FakerSetList;
use RectorPest\Set\PestLevelSetList;
use RectorPest\Set\PestSetList;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/database',
__DIR__ . '/modules',
__DIR__ . '/routes',
__DIR__ . '/tests',
])
->withPhpSets()
->withAttributesSets()
->withTypeCoverageLevel(10)
->withDeadCodeLevel(10)
->withCodeQualityLevel(10)
->withCodingStyleLevel(10)
->withImportNames(removeUnusedImports: true)
->withPreparedSets(
privatization: true,
earlyReturn: true,
)
->withComposerBased(
phpunit: true,
laravel: true,
)
->withRootFiles()
->withMemoryLimit('2G')
->withFluentCallNewLine()
->withParallel(maxNumberOfProcess: 10)
->withRealPathReporting()
->withSetProviders(LaravelSetProvider::class)
->withSets([
LaravelSetList::ARRAY_STR_FUNCTIONS_TO_STATIC_CALL,
LaravelSetList::LARAVEL_TESTING,
LaravelSetList::LARAVEL_TYPE_DECLARATIONS,
FakerSetList::FAKER_10,
// \RectorLaravel\Set\Packages\Livewire\LivewireSetList::LIVEWIRE_30,
PestLevelSetList::UP_TO_PEST_40,
PestSetList::PEST_CODE_QUALITY,
])
->withRules([
RemoveDumpDataDeadCodeRector::class,
ResponseHelperCallToJsonResponseRector::class,
ArrayToArrGetRector::class,
ConfigToTypedConfigMethodCallRector::class,
EmptyToBlankAndFilledFuncRector::class,
// RectorLaravel\Rector\StaticCall\MinutesToSecondsInCacheRector::class,
RemoveModelPropertyFromFactoriesRector::class,
RouteActionCallableRector::class,
UseComponentPropertyWithinCommandsRector::class,
UseForwardsCallsTraitRector::class,
WhereToWhereLikeRector::class,
EnumCaseToPascalCaseRector::class,
]);