generated from spatie/package-skeleton-laravel
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrector.php
37 lines (34 loc) · 1.42 KB
/
rector.php
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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Identical\FlipTypeControlToUseExclusiveTypeRector;
use Rector\Config\RectorConfig;
use Rector\DeadCode\Rector\PropertyProperty\RemoveNullPropertyInitializationRector;
use Rector\Php70\Rector\StmtsAwareInterface\IfIssetToCoalescingRector;
use Rector\Php80\Rector\ClassMethod\AddParamBasedOnParentClassMethodRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnDirectArrayRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromReturnNewRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector;
return RectorConfig::configure()
->withCache(__DIR__.'/build/rector')
->withPaths([
__DIR__.'/src',
__DIR__.'/config',
])
->withPhpSets()
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
)
->withSkip([
AddArrowFunctionReturnTypeRector::class,
AddParamBasedOnParentClassMethodRector::class,
FlipTypeControlToUseExclusiveTypeRector::class,
IfIssetToCoalescingRector::class,
RemoveNullPropertyInitializationRector::class,
ReturnTypeFromReturnDirectArrayRector::class,
ReturnTypeFromReturnNewRector::class,
ReturnTypeFromStrictTypedCallRector::class,
]);