Skip to content

Commit

Permalink
chore(git): update rector.php and helpers.php
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
guanguans committed Jan 17, 2024
1 parent 4404313 commit 971f7c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 6 additions & 4 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -82,7 +86,6 @@
// optional rules
// RemoveUnusedVariableAssignRector::class,
// StaticClosureRector::class,
AddArrayDefaultToArrayPropertyRector::class,
RemoveEmptyClassMethodRector::class,
ExplicitBoolCompareRector::class,
AddSeeTestAnnotationRector::class,
Expand All @@ -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,
Expand All @@ -123,7 +126,6 @@
SetList::INSTANCEOF,

PHPUnitLevelSetList::UP_TO_PHPUNIT_80,
PHPUnitSetList::PHPUNIT_80,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
]);

Expand Down
2 changes: 0 additions & 2 deletions src/Support/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
if (! function_exists('configure_options')) {
/**
* Configuration options.
*
* @param \Closure $closure
*/
function configure_options(array $options, Closure $closure): array
{
Expand Down

0 comments on commit 971f7c8

Please sign in to comment.