-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathrector.php
More file actions
43 lines (40 loc) · 1.15 KB
/
rector.php
File metadata and controls
43 lines (40 loc) · 1.15 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
<?php
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\SafeDeclareStrictTypesRector;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/Classes',
__DIR__ . '/Tests',
])
->withPhpSets()
->withAutoloadPaths([
__DIR__ . '/.Build/vendor/autoload.php',
])
->withImportNames(
importShortClasses: false,
removeUnusedImports: true,
)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
typeDeclarationDocblocks: true,
earlyReturn: true,
phpunitCodeQuality: true,
)
->withSets([
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_110,
])
->withRootFiles()
->withSkip([
__DIR__ . '/Classes/Model/Type/*',
__DIR__ . '/Classes/ViewHelpers/Type/*',
PreferPHPUnitThisCallRector::class,
SafeDeclareStrictTypesRector::class => [
__DIR__ . '/ext_emconf.php',
]
]);