Skip to content

Commit

Permalink
chore(rector): Remove UnSpreadOperatorRector
Browse files Browse the repository at this point in the history
- Remove UnSpreadOperatorRector from the list of coding style rectors
- Update the RectorConfig to remove UnSpreadOperatorRector
- FinalizeClassesWithoutChildrenRector now includes app/Exceptions/RuntimeException.php and app/Generators/OpenAIGenerator.php
- JsonThrowOnErrorRector now includes app/Generators/OpenAIGenerator.php
- Add DowngradeLevelSetList::DOWN_TO_PHP_73 to the sets in RectorConfig
  • Loading branch information
guanguans committed Nov 1, 2023
1 parent 9919ae4 commit 7ec08f3
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 @@ -19,7 +19,6 @@
use Rector\CodeQuality\Rector\If_\ExplicitBoolCompareRector;
use Rector\CodeQuality\Rector\LogicalAnd\LogicalToBooleanRector;
use Rector\CodingStyle\Rector\Class_\AddArrayDefaultToArrayPropertyRector;
use Rector\CodingStyle\Rector\ClassMethod\UnSpreadOperatorRector;
use Rector\CodingStyle\Rector\Closure\StaticClosureRector;
use Rector\CodingStyle\Rector\Encapsed\EncapsedStringsToSprintfRector;
use Rector\CodingStyle\Rector\Encapsed\WrapEncapsedVariableInCurlyBracesRector;
Expand All @@ -38,6 +37,7 @@
use Rector\PHPUnit\Set\PHPUnitSetList;
use Rector\Privatization\Rector\Class_\FinalizeClassesWithoutChildrenRector;
use Rector\Renaming\Rector\FuncCall\RenameFunctionRector;
use Rector\Set\ValueObject\DowngradeLevelSetList;
use Rector\Set\ValueObject\LevelSetList;
use Rector\Set\ValueObject\SetList;
use Rector\Strict\Rector\Ternary\DisallowedShortTernaryRuleFixerRector;
Expand Down Expand Up @@ -85,7 +85,6 @@
// RemoveUnusedVariableAssignRector::class,
// SimplifyBoolIdenticalTrueRector::class,
// StaticClosureRector::class,
// UnSpreadOperatorRector::class,

ReturnBinaryOrToEarlyReturnRector::class,
EncapsedStringsToSprintfRector::class,
Expand All @@ -94,7 +93,6 @@
LogicalToBooleanRector::class,
RenameParamToMatchTypeRector::class,
RenameVariableToMatchMethodCallReturnTypeRector::class,
UnSpreadOperatorRector::class,
WrapEncapsedVariableInCurlyBracesRector::class,
// NewlineAfterStatementRector::class,

Expand All @@ -108,8 +106,9 @@
__DIR__.'/app/Support/FoundationSDK.php',
],
FinalizeClassesWithoutChildrenRector::class => [
__DIR__.'/app/Generators/OpenAIGenerator.php',
__DIR__.'/app/Exceptions/RuntimeException.php',
__DIR__.'/app/Generators/ErnieBotGenerator.php',
__DIR__.'/app/Generators/OpenAIGenerator.php',
],
JsonThrowOnErrorRector::class => [
__DIR__.'/app/Generators/OpenAIGenerator.php',
Expand Down Expand Up @@ -139,6 +138,7 @@
]);

$rectorConfig->sets([
// DowngradeLevelSetList::DOWN_TO_PHP_73,
LevelSetList::UP_TO_PHP_73,
SetList::PHP_73,
SetList::CODE_QUALITY,
Expand Down

0 comments on commit 7ec08f3

Please sign in to comment.