Skip to content

Commit

Permalink
refactor(config): update PHPUnit set and add new rule
Browse files Browse the repository at this point in the history
- Update PHPUnit set to use PHPUNIT_90
- Add new rule to convert annotations to attributes
  • Loading branch information
guanguans committed Jan 29, 2024
1 parent 5650041 commit 56fea1d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,20 @@
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\Config\RectorConfig;
use Rector\Core\Configuration\Option;
use Rector\Core\ValueObject\PhpVersion;
use Rector\Configuration\Option;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector;
use Rector\EarlyReturn\Rector\If_\ChangeAndIfToEarlyReturnRector;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
use Rector\EarlyReturn\Rector\StmtsAwareInterface\ReturnEarlyIfVariableRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\RemoveExpectAnyFromMockRector;
use Rector\PHPUnit\Set\PHPUnitLevelSetList;
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Set\ValueObject\DowngradeLevelSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\BooleanNot\BooleanInBooleanNotRuleFixerRector;
use Rector\TypeDeclaration\Rector\ClassMethod\StrictArrayParamDimFetchRector;
use Rector\ValueObject\PhpVersion;

return static function (RectorConfig $rectorConfig): void {
define('MHASH_XXH3', 2 << 0);
Expand Down Expand Up @@ -145,8 +144,9 @@
SetList::EARLY_RETURN,
SetList::INSTANCEOF,

PHPUnitLevelSetList::UP_TO_PHPUNIT_90,
PHPUnitSetList::PHPUNIT_90,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);

$rectorConfig->rules([
Expand Down

0 comments on commit 56fea1d

Please sign in to comment.