-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrector.php
More file actions
42 lines (39 loc) · 1.11 KB
/
Copy pathrector.php
File metadata and controls
42 lines (39 loc) · 1.11 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
<?php
declare(strict_types=1);
use Fsylum\RectorWordPress\Set\WordPressLevelSetList;
use Rector\Config\RectorConfig;
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
use Rector\ValueObject\PhpVersion;
return RectorConfig::configure()
->withPaths([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__ . '/config',
__DIR__ . '/flowd-kochmodus.php',
__DIR__ . '/uninstall.php',
])
->withSkip([
__DIR__ . '/vendor',
__DIR__ . '/node_modules',
__DIR__ . '/blocks/build',
])
->withPhpVersion(PhpVersion::PHP_74)
->withPreparedSets(
deadCode: true,
codeQuality: true,
typeDeclarations: true,
privatization: true,
earlyReturn: true,
)
->withSets([
WordPressLevelSetList::UP_TO_WP_6_8,
])
->withRules([
DeclareStrictTypesRector::class,
])
# To have a better analysis from PHPStan, we teach it here some more things
->withPHPStanConfigs([
__DIR__ . '/phpstan.neon'
])
->withImportNames()
->withCache(__DIR__ . '/.rector-cache');