-
Notifications
You must be signed in to change notification settings - Fork 106
Expand file tree
/
Copy pathrector.php
More file actions
54 lines (51 loc) · 2.3 KB
/
Copy pathrector.php
File metadata and controls
54 lines (51 loc) · 2.3 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
<?php
use Rector\CodeQuality\Rector\Concat\JoinStringConcatRector;
use Rector\CodeQuality\Rector\FuncCall\CompactToVariablesRector;
use Rector\CodeQuality\Rector\Identical\StrlenZeroToIdenticalEmptyStringRector;
use Rector\CodingStyle\Rector\Assign\NestedTernaryToMatchRector;
use Rector\Config\RectorConfig;
use Rector\Php80\Rector\Class_\ClassPropertyAssignToConstructorPromotionRector;
use Rector\Privatization\Rector\ClassMethod\PrivatizeFinalClassMethodRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddParamTypeDeclarationRector;
use Rector\TypeDeclaration\Rector\ClassMethod\AddReturnTypeDeclarationRector;
use RectorLaravel\Rector\BooleanNot\AvoidNegatedCollectionContainsOrDoesntContainRector;
use RectorLaravel\Rector\Coalesce\ApplyDefaultInsteadOfNullCoalesceRector;
use RectorLaravel\Rector\Expr\AppEnvironmentComparisonToParameterRector;
use RectorLaravel\Rector\FuncCall\RemoveDumpDataDeadCodeRector;
use RectorLaravel\Rector\MethodCall\EloquentOrderByToLatestOrOldestRector;
use RectorLaravel\Rector\StaticCall\CarbonSetTestNowToTravelToRector;
use RectorLaravel\Rector\StaticCall\CarbonToDateFacadeRector;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withImportNames()
->withParallel()
->withRules([
// Types
AddReturnTypeDeclarationRector::class,
AddParamTypeDeclarationRector::class,
NestedTernaryToMatchRector::class,
// Strictness
PrivatizeFinalClassMethodRector::class,
ClassPropertyAssignToConstructorPromotionRector::class,
JoinStringConcatRector::class,
StrlenZeroToIdenticalEmptyStringRector::class,
CompactToVariablesRector::class,
// Laravel specific
AppEnvironmentComparisonToParameterRector::class,
ApplyDefaultInsteadOfNullCoalesceRector::class,
AvoidNegatedCollectionContainsOrDoesntContainRector::class,
CarbonSetTestNowToTravelToRector::class,
CarbonToDateFacadeRector::class,
EloquentOrderByToLatestOrOldestRector::class,
RemoveDumpDataDeadCodeRector::class,
])
->withSetProviders(LaravelSetProvider::class)
->withComposerBased(laravel: true)
->withPaths([
__DIR__ . '/app',
])
->withSkip([
__DIR__ . '/storage',
__DIR__ . '/bootstrap/cache',
__DIR__ . '/vendor',
]);