-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
38 lines (35 loc) · 1.22 KB
/
rector.php
File metadata and controls
38 lines (35 loc) · 1.22 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
<?php
declare(strict_types=1);
use Rector\CodingStyle\Rector\Catch_\CatchExceptionNameMatchingTypeRector;
use Rector\CodingStyle\Rector\PostInc\PostIncDecToPreIncDecRector;
use Rector\Config\RectorConfig;
use Rector\EarlyReturn\Rector\If_\ChangeOrIfContinueToMultiContinueRector;
use Rector\Php83\Rector\ClassMethod\AddOverrideAttributeToOverriddenMethodsRector;
use Rector\TypeDeclaration\Rector\ArrowFunction\AddArrowFunctionReturnTypeRector;
return RectorConfig::configure()
->withPaths([
__DIR__.'/src',
])
->withImportNames(importShortClasses: false, removeUnusedImports: true)
->withRootFiles()
->withPHPStanConfigs([
__DIR__.'/phpstan.neon',
])
->withPhpSets()
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
privatization: true,
instanceOf: true,
earlyReturn: true,
rectorPreset: true,
)
->withSkip([
AddOverrideAttributeToOverriddenMethodsRector::class,
ChangeOrIfContinueToMultiContinueRector::class,
PostIncDecToPreIncDecRector::class,
AddArrowFunctionReturnTypeRector::class,
CatchExceptionNameMatchingTypeRector::class,
]);