Skip to content

Commit 3eb42ce

Browse files
authored
[TASK] Add more Rector rules (#771)
1 parent c7e6118 commit 3eb42ce

File tree

1 file changed

+28
-6
lines changed

1 file changed

+28
-6
lines changed

config/rector.php

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
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;
610

711
return RectorConfig::configure()
812
->withPaths(
@@ -11,9 +15,27 @@
1115
__DIR__ . '/../tests',
1216
]
1317
)
14-
->withPhpSets()
15-
->withRules(
16-
[
17-
// AddVoidReturnTypeWhereNoReturnRector::class,
18-
]
19-
);
18+
->withSets([
19+
// Rector sets
20+
21+
LevelSetList::UP_TO_PHP_73,
22+
23+
// SetList::CODE_QUALITY,
24+
// SetList::CODING_STYLE,
25+
// SetList::DEAD_CODE,
26+
// SetList::EARLY_RETURN,
27+
// SetList::INSTANCEOF,
28+
// SetList::NAMING,
29+
// SetList::PRIVATIZATION,
30+
SetList::STRICT_BOOLEANS,
31+
SetList::TYPE_DECLARATION,
32+
33+
// PHPUnit sets
34+
35+
PHPUnitSetList::PHPUNIT_80,
36+
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
37+
])
38+
->withRules([
39+
AddVoidReturnTypeWhereNoReturnRector::class,
40+
])
41+
->withImportNames(true, true, false);

0 commit comments

Comments
 (0)