Repository navigation
Expand file tree
/
Copy pathrector.php
More file actions
57 lines (53 loc) · 1.91 KB
/
Copy pathrector.php
File metadata and controls
57 lines (53 loc) · 1.91 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
52
53
54
55
56
57
<?php
/**
* This file is part of the php-svg-optimizer package.
* (c) Mathias Reker <github@reker.dk>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Naming\Rector\Foreach_\RenameForeachValueVariableToMatchMethodCallReturnTypeRector;
use Rector\PHPUnit\AnnotationsToAttributes\Rector\Class_\AnnotationWithValueToAttributeRector;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\Visibility\Rector\ClassConst\ChangeConstantVisibilityRector;
use Rector\Visibility\Rector\ClassMethod\ChangeMethodVisibilityRector;
return RectorConfig::configure()
->withPhpSets()
->withComposerBased(phpunit: true)
->withIndent()
->withImportNames(importShortClasses: false, removeUnusedImports: true)
->withPreparedSets(
deadCode: true,
codeQuality: true,
codingStyle: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
privatization: true,
naming: true,
instanceOf: true,
earlyReturn: true,
rectorPreset: true,
phpunitCodeQuality: true,
phpunitNarrowAsserts: true,
symfonyCodeQuality: true,
)
->withAttributesSets()
->withTreatClassesAsFinal()
->withSkipPath(__DIR__ . '/vendor')
->withPaths([__DIR__, __DIR__ . '/bin/svg-optimizer'])
->withoutParallel()
->withSkip(
[
__DIR__ . '/tests/Architecture/Rule/Fixture',
PreferPHPUnitThisCallRector::class,
RenameForeachValueVariableToMatchMethodCallReturnTypeRector::class => [__DIR__ . '/src/Pass'],
]
)
->withRules(
[
ChangeConstantVisibilityRector::class,
ChangeMethodVisibilityRector::class,
AnnotationWithValueToAttributeRector::class,
]
);