forked from wprig/wprig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
49 lines (42 loc) · 923 Bytes
/
rector.php
File metadata and controls
49 lines (42 loc) · 923 Bytes
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
<?php
/**
* Rector Config File
*
* @link https://github.com/rectorphp/rector
*
* @package rector
*/
declare(strict_types=1);
use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\Property\TypedPropertyFromStrictConstructorRector;
return static function ( RectorConfig $rector_config ): void {
// Specify paths to analyze.
$rector_config->paths(
array(
__DIR__,
)
);
// Skip these directories.
$rector_config->skip(
array(
__DIR__ . '/vendor',
__DIR__ . '/node_modules',
__DIR__ . '/tests', // Optional.
)
);
$rector_config->skip(
array(
Rector\DeadCode\Rector\Property\RemoveUselessVarTagRector::class,
)
);
// Add single rule.
$rector_config->rule( TypedPropertyFromStrictConstructorRector::class );
// Add prepared sets of rules.
$rector_config->sets(
array(
SetList::DEAD_CODE,
SetList::CODE_QUALITY,
)
);
};