Skip to content

Commit 41e3151

Browse files
committed
chore: Activate more rector rules
1 parent 65723d2 commit 41e3151

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

rector.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,13 @@
44

55
use Rector\Config\RectorConfig;
66
use Rector\Naming\Rector\Class_\RenamePropertyToMatchTypeRector;
7+
use Rector\Php74\Rector\LNumber\AddLiteralSeparatorToNumberRector;
8+
use Rector\PHPUnit\CodeQuality\Rector\Class_\PreferPHPUnitThisCallRector;
9+
use Rector\PHPUnit\Rector\Class_\PreferPHPUnitSelfCallRector;
10+
use Rector\PHPUnit\Set\PHPUnitSetList;
711
use Rector\Set\ValueObject\LevelSetList;
812
use Rector\Set\ValueObject\SetList;
13+
use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector;
914

1015
return static function (RectorConfig $rectorConfig): void {
1116
$rectorConfig->paths([
@@ -14,8 +19,21 @@
1419
__DIR__ . '/rector.php',
1520
]);
1621

22+
$rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon.dist');
23+
1724
$rectorConfig->sets([
1825
LevelSetList::UP_TO_PHP_82,
26+
27+
PHPUnitSetList::PHPUNIT_40,
28+
PHPUnitSetList::PHPUNIT_50,
29+
PHPUnitSetList::PHPUNIT_60,
30+
PHPUnitSetList::PHPUNIT_70,
31+
PHPUnitSetList::PHPUNIT_80,
32+
PHPUnitSetList::PHPUNIT_90,
33+
PHPUnitSetList::PHPUNIT_100,
34+
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
35+
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
36+
1937
SetList::CODE_QUALITY,
2038
SetList::CODING_STYLE,
2139
SetList::DEAD_CODE,
@@ -27,7 +45,15 @@
2745
SetList::INSTANCEOF,
2846
]);
2947

48+
$rectorConfig->rules([
49+
AddLiteralSeparatorToNumberRector::class,
50+
DeclareStrictTypesRector::class,
51+
PreferPHPUnitSelfCallRector::class,
52+
]);
53+
3054
$rectorConfig->skip([
55+
PreferPHPUnitThisCallRector::class,
56+
// phpcs:ignore Squiz.Arrays.ArrayDeclaration.KeySpecified
3157
RenamePropertyToMatchTypeRector::class => [
3258
__DIR__ . '/tests',
3359
],

0 commit comments

Comments
 (0)