mirror of
https://github.com/rectorphp/rector.git
synced 2025-02-13 12:33:52 +01:00
recomment
This commit is contained in:
parent
b7c6e2b7c0
commit
32eba83751
10
ecs.php
10
ecs.php
@ -19,8 +19,8 @@ use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigura
|
||||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayListItemNewlineFixer;
|
||||
use Symplify\CodingStandard\Fixer\ArrayNotation\ArrayOpenerAndCloserNewlineFixer;
|
||||
use Symplify\CodingStandard\Fixer\ArrayNotation\StandaloneLineInMultilineArrayFixer;
|
||||
use Symplify\CodingStandard\Fixer\Commenting\RemoveCommentedCodeFixer;
|
||||
use Symplify\CodingStandard\Fixer\LineLength\LineLengthFixer;
|
||||
use Symplify\CodingStandard\Sniffs\Debug\CommentedOutCodeSniff;
|
||||
use Symplify\EasyCodingStandard\ValueObject\Option;
|
||||
use Symplify\EasyCodingStandard\ValueObject\Set\SetList;
|
||||
|
||||
@ -88,12 +88,10 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
BlankLineAfterOpeningTagFixer::class,
|
||||
Psr4Fixer::class,
|
||||
|
||||
// buggy - fixed on master
|
||||
RemoveCommentedCodeFixer::class,
|
||||
|
||||
PhpdocTypesFixer::class => [__DIR__ . '/rules/php74/src/Rector/Double/RealToFloatTypeCastRector.php'],
|
||||
CommentedOutCodeSniff::class . '.Found' => [
|
||||
__DIR__ . '/rules/php72/src/Rector/Assign/ListEachRector.php',
|
||||
__DIR__ . '/rules/dead-code/src/Rector/FunctionLike/RemoveOverriddenValuesRector.php',
|
||||
__DIR__ . '/rules/php-spec-to-phpunit/src/Rector/MethodCall/PhpSpecPromisesToPHPUnitAssertRector.php',
|
||||
],
|
||||
PhpUnitStrictFixer::class => [
|
||||
__DIR__ . '/packages/better-php-doc-parser/tests/PhpDocInfo/PhpDocInfo/PhpDocInfoTest.php',
|
||||
__DIR__ . '/tests/PhpParser/Node/NodeFactoryTest.php',
|
||||
|
@ -199,6 +199,8 @@ CODE_SAMPLE
|
||||
if ($listItem === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// If it's a variable by value, not by reference, then skip
|
||||
if ($listItem->value instanceof Variable && ! $listItem->byRef) {
|
||||
continue;
|
||||
}
|
||||
|
@ -242,6 +242,7 @@ CODE_SAMPLE
|
||||
|
||||
if ($serviceName) {
|
||||
if (class_exists($serviceName)) {
|
||||
// single class service
|
||||
return new ObjectType($serviceName);
|
||||
}
|
||||
|
||||
|
@ -77,6 +77,8 @@ CODE_SAMPLE
|
||||
if (! $rootNameNode instanceof String_) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// switch arguments
|
||||
[$node->args, $rootMethodCallNode->args] = [$rootMethodCallNode->args, $node->args];
|
||||
|
||||
$rootMethodCallNode->name = new Identifier('getRootNode');
|
||||
|
Loading…
x
Reference in New Issue
Block a user