-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathrector.php
More file actions
50 lines (47 loc) · 1.75 KB
/
Copy pathrector.php
File metadata and controls
50 lines (47 loc) · 1.75 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Empty_\SimplifyEmptyCheckOnEmptyArrayRector;
use Rector\CodeQuality\Rector\FunctionLike\SimplifyUselessVariableRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\If_\RemoveAlwaysTrueIfConditionRector;
use Rector\DeadCode\Rector\Stmt\RemoveUnreachableStatementRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
use RectorLaravel\Set\LaravelLevelSetList;
use RectorLaravel\Set\LaravelSetProvider;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/routes',
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withCache()
->withParallel()
->withRules([
AddOverrideAttributeToOverriddenMethodsRector::class,
TypedPropertyFromStrictConstructorRector::class,
])
->withSkip([
// Only add classes that give false positives here
ClosureToArrowFunctionRector::class,
DisallowedEmptyRuleFixerRector::class,
RemoveAlwaysTrueIfConditionRector::class,
RemoveUnreachableStatementRector::class,
SimplifyEmptyCheckOnEmptyArrayRector::class,
SimplifyUselessVariableRector::class,
])
->withPhpSets()
->withPreparedSets(
deadCode: true,
codeQuality: true,
earlyReturn: true,
)
->withSetProviders(LaravelSetProvider::class)
->withComposerBased(laravel: true, phpunit: true)
->withSets([
LaravelLevelSetList::UP_TO_LARAVEL_110,
]);