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 17, 2024
1 parent c7e6118 commit 19d58f3
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_80,
// PHPUnitSetList::PHPUNIT_CODE_QUALITY,
])
->withRules([
AddVoidReturnTypeWhereNoReturnRector::class,
])
->withImportNames(true, true, false);

0 comments on commit 19d58f3

Please sign in to comment.