-
-
Notifications
You must be signed in to change notification settings - Fork 769
Expand file tree
/
Copy pathrector.php
More file actions
44 lines (41 loc) · 1.48 KB
/
Copy pathrector.php
File metadata and controls
44 lines (41 loc) · 1.48 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\ExplicitReturnNullRector;
use Rector\CodeQuality\Rector\Equal\UseIdenticalOverEqualWithSameTypeRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnNeverTypeRector;
use RectorLaravel\Set\LaravelLevelSetList;
use RectorLaravel\Set\LaravelSetList;
return RectorConfig::configure()
->withPhpSets()
->withPaths([
__DIR__ . '/app',
__DIR__ . '/bootstrap',
__DIR__ . '/config',
__DIR__ . '/public',
__DIR__ . '/resources',
__DIR__ . '/routes',
__DIR__ . '/tests',
__DIR__ . '/database/factories',
__DIR__ . '/database/seeders',
])
->withSkip([
__DIR__ . '/bootstrap/cache/*',
ExplicitReturnNullRector::class, // No conflict with pint
ExplicitBoolCompareRector::class,
UseIdenticalOverEqualWithSameTypeRector::class,
AddVoidReturnTypeWhereNoReturnRector::class, // TypeCoverageLevel(20)
ReturnNeverTypeRector::class, // TypeCoverageLevel(45) php 8.1
])
->withSets([
LaravelLevelSetList::UP_TO_LARAVEL_120,
LaravelSetList::LARAVEL_LEGACY_FACTORIES_TO_CLASSES,
])
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
);