-
-
Notifications
You must be signed in to change notification settings - Fork 38
/
Copy pathrector.php
44 lines (40 loc) · 1.53 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
<?php
declare(strict_types=1);
use Rector\CodeQuality\Rector\ClassMethod\InlineArrayReturnAssignRector;
use Rector\Config\RectorConfig;
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector;
use Rector\Php55\Rector\String_\StringClassNameToClassConstantRector;
return RectorConfig::configure()
->withPaths([__DIR__ . '/config', __DIR__ . '/src', __DIR__ . '/tests', __DIR__ . '/routes'])
->withImportNames(removeUnusedImports: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
naming: true,
privatization: true,
typeDeclarations: true,
rectorPreset: true,
)
->withPhpSets()
->withAttributesSets()
->withSkip([
RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class => [
// metadata -> datum false positive
__DIR__ . '/src/FileSystem/RectorFinder.php',
__DIR__ . '/src/Controller/Socials/RuleThumbnailController.php',
],
StringClassNameToClassConstantRector::class => [
// non-existing class in /src
__DIR__ . '/src/RuleFilter/ConfiguredDiffSamplesFactory.php',
],
// not suitable for such a long content
InlineArrayReturnAssignRector::class => [__DIR__ . '/src/Repository/RenovationItemRepository.php'],
])
->withRootFiles()
->withSkip([
'*/Fixture/*',
'*/Expected/*',
// generated
__DIR__ . '/src/Ast/PhpParser/ClickablePrinter.php',
]);