Skip to content

Commit 46e2500

Browse files
committed
[TASK] Add more Rector rules
1 parent b56f7c6 commit 46e2500

File tree

1 file changed

+42
-6
lines changed

1 file changed

+42
-6
lines changed

config/rector.php

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
declare(strict_types=1);
44

55
use Rector\Config\RectorConfig;
6+
use Rector\PHPUnit\Set\PHPUnitSetList;
7+
use Rector\Set\ValueObject\LevelSetList;
8+
use Rector\Set\ValueObject\SetList;
9+
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
10+
use Rector\ValueObject\PhpVersion;
611

712
return RectorConfig::configure()
813
->withPaths(
@@ -11,9 +16,40 @@
1116
__DIR__ . '/../tests',
1217
]
1318
)
14-
->withPhpSets()
15-
->withRules(
16-
[
17-
// AddVoidReturnTypeWhereNoReturnRector::class,
18-
]
19-
);
19+
->withPhpVersion(PhpVersion::PHP_72)
20+
->withPhpSets(
21+
true
22+
)
23+
->withSets([
24+
// Rector sets
25+
26+
LevelSetList::UP_TO_PHP_72,
27+
// LevelSetList::UP_TO_PHP_73,
28+
// LevelSetList::UP_TO_PHP_74,
29+
// LevelSetList::UP_TO_PHP_80,
30+
// LevelSetList::UP_TO_PHP_81,
31+
// LevelSetList::UP_TO_PHP_82,
32+
// LevelSetList::UP_TO_PHP_83,
33+
34+
// SetList::CODE_QUALITY,
35+
// SetList::CODING_STYLE,
36+
// SetList::DEAD_CODE,
37+
// SetList::EARLY_RETURN,
38+
// SetList::INSTANCEOF,
39+
// SetList::NAMING,
40+
// SetList::PRIVATIZATION,
41+
SetList::STRICT_BOOLEANS,
42+
SetList::TYPE_DECLARATION,
43+
44+
// PHPUnit sets
45+
46+
PHPUnitSetList::PHPUNIT_90,
47+
// PHPUnitSetList::PHPUNIT_100,
48+
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
49+
])
50+
->withRules([
51+
AddVoidReturnTypeWhereNoReturnRector::class,
52+
])
53+
->withImportNames(true, true, false)
54+
->withSkip([
55+
]);

0 commit comments

Comments
 (0)