From 971f7c88208712d5918fb553eff1771b325c80bf Mon Sep 17 00:00:00 2001 From: yaozm Date: Wed, 17 Jan 2024 11:40:31 +0800 Subject: [PATCH] chore(git): update rector.php and helpers.php - Remove AddArrayDefaultToArrayPropertyRector from rector.php - Add defines for MHASH_XXH3, MHASH_XXH32, MHASH_XXH64, and MHASH_XXH128 in rector.php - Update sets in rector.php - Remove unnecessary comment in rector.php - Remove unnecessary comment in helpers.php - Update PHPDoc comment in helpers.php - Remove unused parameter in helpers.php --- rector.php | 10 ++++++---- src/Support/helpers.php | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/rector.php b/rector.php index 481849ac..6972403e 100644 --- a/rector.php +++ b/rector.php @@ -17,7 +17,6 @@ use Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector; use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector; use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector; -use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector; use Rector\CodingStyle\Rector\Closure\StaticClosureRector; use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector; use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector; @@ -31,10 +30,15 @@ use Rector\PHPUnit\CodeQuality\Rector\Class_\AddSeeTestAnnotationRector; 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; return static function (RectorConfig $rectorConfig): void { + define('MHASH_XXH3', 2 << 0); + define('MHASH_XXH32', 2 << 1); + define('MHASH_XXH64', 2 << 2); + define('MHASH_XXH128', 2 << 3); $rectorConfig->importNames(false, false); $rectorConfig->importShortClasses(false); // $rectorConfig->disableParallel(); @@ -82,7 +86,6 @@ // optional rules // RemoveUnusedVariableAssignRector::class, // StaticClosureRector::class, - AddArrayDefaultToArrayPropertyRector::class, RemoveEmptyClassMethodRector::class, ExplicitBoolCompareRector::class, AddSeeTestAnnotationRector::class, @@ -106,8 +109,8 @@ ]); $rectorConfig->sets([ + DowngradeLevelSetList::DOWN_TO_PHP_72, LevelSetList::UP_TO_PHP_72, - SetList::PHP_72, // SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION, SetList::CODE_QUALITY, SetList::CODING_STYLE, @@ -123,7 +126,6 @@ SetList::INSTANCEOF, PHPUnitLevelSetList::UP_TO_PHPUNIT_80, - PHPUnitSetList::PHPUNIT_80, PHPUnitSetList::PHPUNIT_CODE_QUALITY, ]); diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 8c3587c7..8f726959 100644 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -16,8 +16,6 @@ if (! function_exists('configure_options')) { /** * Configuration options. - * - * @param \Closure $closure */ function configure_options(array $options, Closure $closure): array {