-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrector.php
More file actions
51 lines (48 loc) · 1.56 KB
/
rector.php
File metadata and controls
51 lines (48 loc) · 1.56 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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\String_\UseClassKeywordForClassNameResolutionRector;
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
use Rector\Php81\Rector\MethodCall\RemoveReflectionSetAccessibleCallsRector;
use Rector\Php83\Rector\ClassConst\AddTypeToConstRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
return RectorConfig::configure()
->withImportNames(removeUnusedImports: true)
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets(
php83: true
)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
privatization: true,
earlyReturn: true
)
->withRules([
DeclareStrictTypesRector::class,
])
->withSets([
PHPUnitSetList::PHPUNIT_90,
])
->withSkip([
'*/Fixture/*',
'*/Source/*',
AddTypeToConstRector::class,
DeclareStrictTypesRector::class => [
__DIR__ . '/src/Playground',
],
ClosureToArrowFunctionRector::class,
StringClassNameToClassConstantRector::class,
UseClassKeywordForClassNameResolutionRector::class => [
__DIR__ . '/tests',
],
RemoveReflectionSetAccessibleCallsRector::class => [
__DIR__ . '/src/ConfigurationResolver/Middleware/PrivateStaticMiddleware.php',
],
]);