Слияние кода завершено, страница обновится автоматически
<?php
declare(strict_types=1);
/**
* This file is part of the guanguans/soar-php.
*
* (c) guanguans <ityaozm@gmail.com>
*
* This source file is subject to the MIT license that is bundled.
*/
use Rector\Caching\ValueObject\Storage\FileCacheStorage;
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
use Rector\CodeQuality\Rector\Expression\InlineIfToExplicitIfRector;
use Rector\CodeQuality\Rector\Identical\SimplifyBoolIdenticalTrueRector;
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
use Rector\Config\RectorConfig;
use Rector\Configuration\Option;
use Rector\DeadCode\Rector\Assign\RemoveUnusedVariableAssignRector;
use Rector\DeadCode\Rector\ClassMethod\RemoveEmptyClassMethodRector;
use Rector\EarlyReturn\Rector\Return_\ReturnBinaryOrToEarlyReturnRector;
use Rector\EarlyReturn\Rector\StmtsAwareInterface\ReturnEarlyIfVariableRector;
use Rector\PHPUnit\CodeQuality\Rector\MethodCall\RemoveExpectAnyFromMockRector;
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);
define('MHASH_XXH32', 2 << 1);
define('MHASH_XXH64', 2 << 2);
define('MHASH_XXH128', 2 << 3);
$rectorConfig->importNames(false, false);
$rectorConfig->importShortClasses(false);
// $rectorConfig->disableParallel();
$rectorConfig->parallel(240);
$rectorConfig->phpstanConfig(__DIR__.'/phpstan.neon');
$rectorConfig->phpVersion(PhpVersion::PHP_73);
// $rectorConfig->cacheClass(FileCacheStorage::class);
// $rectorConfig->cacheDirectory(__DIR__.'/build/rector');
// $rectorConfig->containerCacheDirectory(__DIR__.'/build/rector');
// $rectorConfig->disableParallel();
// $rectorConfig->fileExtensions(['php']);
// $rectorConfig->indent(' ', 4);
// $rectorConfig->memoryLimit('2G');
// $rectorConfig->nestedChainMethodCallLimit(3);
// $rectorConfig->noDiffs();
// $rectorConfig->parameters()->set(Option::APPLY_AUTO_IMPORT_NAMES_ON_CHANGED_FILES_ONLY, true);
// $rectorConfig->removeUnusedImports();
$rectorConfig->bootstrapFiles([
// __DIR__.'/vendor/autoload.php',
]);
$rectorConfig->autoloadPaths([
// __DIR__.'/vendor/autoload.php',
]);
$rectorConfig->paths([
__DIR__.'/benchmarks',
__DIR__.'/examples',
__DIR__.'/src',
__DIR__.'/tests',
__DIR__.'/.*.php',
__DIR__.'/*.php',
__DIR__.'/composer-updater',
]);
$rectorConfig->skip([
// rules
// RemoveEmptyClassMethodRector::class,
// RemoveUnusedVariableAssignRector::class,
// ReturnBinaryOrToEarlyReturnRector::class,
// SimplifyBoolIdenticalTrueRector::class,
// StaticClosureRector::class,
ExplicitBoolCompareRector::class,
EncapsedStringsToSprintfRector::class,
InlineIfToExplicitIfRector::class,
LogicalToBooleanRector::class,
WrapEncapsedVariableInCurlyBracesRector::class,
// BooleanInBooleanNotRuleFixerRector::class => [
// __DIR__.'/src/Support/EscapeArg.php',
// ],
ReturnEarlyIfVariableRector::class => [
__DIR__.'/src/Support/EscapeArg.php',
],
RemoveExpectAnyFromMockRector::class => [
__DIR__.'/tests/Concerns/WithDumpableTest.php',
],
StaticClosureRector::class => [
__DIR__.'/tests',
],
StrictArrayParamDimFetchRector::class => [
__DIR__.'/src/Concerns/WithDumpable.php',
],
// paths
__DIR__.'/tests/Concerns/WithRunableTest.php',
__DIR__.'/tests/AspectMock',
'**/Fixture*',
'**/Fixture/*',
'**/Fixtures*',
'**/Fixtures/*',
'**/Stub*',
'**/Stub/*',
'**/Stubs*',
'**/Stubs/*',
'**/Source*',
'**/Source/*',
'**/Expected/*',
'**/Expected*',
'**/__snapshots__/*',
'**/__snapshots__*',
]);
$rectorConfig->sets([
DowngradeLevelSetList::DOWN_TO_PHP_73,
LevelSetList::UP_TO_PHP_73,
// SetList::ACTION_INJECTION_TO_CONSTRUCTOR_INJECTION,
SetList::CODE_QUALITY,
SetList::CODING_STYLE,
SetList::DEAD_CODE,
// SetList::STRICT_BOOLEANS,
// SetList::GMAGICK_TO_IMAGICK,
// SetList::MYSQL_TO_MYSQLI,
SetList::NAMING,
// SetList::PRIVATIZATION,
// SetList::PSR_4,
SetList::TYPE_DECLARATION,
SetList::EARLY_RETURN,
SetList::INSTANCEOF,
PHPUnitSetList::PHPUNIT_90,
PHPUnitSetList::PHPUNIT_CODE_QUALITY,
PHPUnitSetList::ANNOTATIONS_TO_ATTRIBUTES,
]);
$rectorConfig->rules([
InlineConstructorDefaultToPropertyRector::class,
StaticClosureRector::class,
]);
};
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )