-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrector.php
58 lines (55 loc) · 1.52 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<?php
/**
* Rector Configuration
*
* @link https://getrector.com/documentation
* @package create-wordpress-plugin
*/
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
return RectorConfig::configure()
->withParallel()
->withIndent(
indentChar: ' ',
indentSize: 1,
)
->withRootFiles()
->withPaths( [
__DIR__ . '/src',
__DIR__ . '/tests',
] )
/**
* --------------------------------------------------------------------------
* Enabled rector rules/rulesets.
* --------------------------------------------------------------------------
*
* @link https://getrector.com/find-rule
*/
->withPreparedSets(
codeQuality: true,
deadCode: true,
earlyReturn: true,
typeDeclarations: true,
)
/**
* --------------------------------------------------------------------------
* Enable Rector to keep your code up-to-date with the latest features from the PHP version in your composer.json file
* --------------------------------------------------------------------------
*/
->withPhpSets()
->withSets( [
PHPUnitSetList::PHPUNIT_100,
PHPUnitSetList::PHPUNIT_110,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
] )
/**
* --------------------------------------------------------------------------
* Rector rules to skip.
* --------------------------------------------------------------------------
*
* @link https://getrector.com/documentation/ignoring-rules-or-paths
*/
->withSkip( [
Rector\Strict\Rector\Empty_\DisallowedEmptyRuleFixerRector::class,
] );