|
3 | 3 | declare(strict_types=1); |
4 | 4 |
|
5 | 5 | 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; |
6 | 11 |
|
7 | 12 | return RectorConfig::configure() |
8 | 13 | ->withPaths( |
|
11 | 16 | __DIR__ . '/../tests', |
12 | 17 | ] |
13 | 18 | ) |
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_80, |
| 47 | + // PHPUnitSetList::PHPUNIT_90, |
| 48 | + // PHPUnitSetList::PHPUNIT_100, |
| 49 | + // PHPUnitSetList::PHPUNIT_CODE_QUALITY, |
| 50 | + ]) |
| 51 | + ->withRules([ |
| 52 | + AddVoidReturnTypeWhereNoReturnRector::class, |
| 53 | + ]) |
| 54 | + ->withImportNames(true, true, false) |
| 55 | + ->withSkip([ |
| 56 | + ]); |
0 commit comments