-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrector.php
50 lines (47 loc) · 1.65 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
38
39
40
41
42
43
44
45
46
47
48
49
50
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\Class_\CompleteDynamicPropertiesRector;
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
use Rector\TypeDeclaration\Rector\ClassMethod\ReturnTypeFromStrictTypedCallRector;
return RectorConfig::configure()
->withSkip(
[
// CodeQuality
CompleteDynamicPropertiesRector::class,
DisallowedEmptyRuleFixerRector::class,
// CodingStyle
CatchExceptionNameMatchingTypeRector::class,
EncapsedStringsToSprintfRector::class,
// EarlyReturn
ReturnBinaryOrToEarlyReturnRector::class,
// TypeDeclaration
AddArrowFunctionReturnTypeRector::class,
ReturnTypeFromStrictTypedCallRector::class,
]
)
->withAutoloadPaths([__DIR__ . '/vendor/autoload.php'])
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withImportNames()
->withPhpSets(php83: true)
->withSets(
[
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_110,
]
)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
earlyReturn: true
);