|
4 | 4 |
|
5 | 5 | use Rector\Config\RectorConfig;
|
6 | 6 | 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; |
7 | 11 | use Rector\Set\ValueObject\LevelSetList;
|
8 | 12 | use Rector\Set\ValueObject\SetList;
|
| 13 | +use Rector\TypeDeclaration\Rector\StmtsAwareInterface\DeclareStrictTypesRector; |
9 | 14 |
|
10 | 15 | return static function (RectorConfig $rectorConfig): void {
|
11 | 16 | $rectorConfig->paths([
|
|
14 | 19 | __DIR__ . '/rector.php',
|
15 | 20 | ]);
|
16 | 21 |
|
| 22 | + $rectorConfig->phpstanConfig(__DIR__ . '/phpstan.neon.dist'); |
| 23 | + |
17 | 24 | $rectorConfig->sets([
|
18 | 25 | 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 | + |
19 | 37 | SetList::CODE_QUALITY,
|
20 | 38 | SetList::CODING_STYLE,
|
21 | 39 | SetList::DEAD_CODE,
|
|
27 | 45 | SetList::INSTANCEOF,
|
28 | 46 | ]);
|
29 | 47 |
|
| 48 | + $rectorConfig->rules([ |
| 49 | + AddLiteralSeparatorToNumberRector::class, |
| 50 | + DeclareStrictTypesRector::class, |
| 51 | + PreferPHPUnitSelfCallRector::class, |
| 52 | + ]); |
| 53 | + |
30 | 54 | $rectorConfig->skip([
|
| 55 | + PreferPHPUnitThisCallRector::class, |
| 56 | + // phpcs:ignore Squiz.Arrays.ArrayDeclaration.KeySpecified |
31 | 57 | RenamePropertyToMatchTypeRector::class => [
|
32 | 58 | __DIR__ . '/tests',
|
33 | 59 | ],
|
|
0 commit comments