Skip to content

Commit

Permalink
[TASK] Add more Rector rules
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverklee committed Nov 16, 2024
1 parent 2c49003 commit 0b2e564
Showing 1 changed file with 28 additions and 6 deletions.
34 changes: 28 additions & 6 deletions config/rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;

return RectorConfig::configure()
->withPaths(
Expand All @@ -11,9 +15,27 @@
__DIR__ . '/../tests',
]
)
->withPhpSets()
->withRules(
[
// AddVoidReturnTypeWhereNoReturnRector::class,
]
);
->withSets([
// Rector sets

LevelSetList::UP_TO_PHP_73,

// SetList::CODE_QUALITY,
// SetList::CODING_STYLE,
// SetList::DEAD_CODE,
// SetList::EARLY_RETURN,
// SetList::INSTANCEOF,
// SetList::NAMING,
// SetList::PRIVATIZATION,
SetList::STRICT_BOOLEANS,
SetList::TYPE_DECLARATION,

// PHPUnit sets

PHPUnitSetList::PHPUNIT_90,
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
])
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
])
->withImportNames(true, true, false);

0 comments on commit 0b2e564

Please sign in to comment.