Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions rules/Naming/ParamRenamer/ParamRenamer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ public function rename(ParamRename $paramRename): void
$this->variableRenamer->renameVariableInFunctionLike(
$paramRename->getFunctionLike(),
$paramRename->getCurrentName(),
$paramRename->getExpectedName(),
null
$paramRename->getExpectedName()
);

// 3. rename @param variable in docblock too
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ function (Node $subNode) use ($node, &$hasRenamed): ?int {
$hasChanged = $this->variableRenamer->renameVariableInFunctionLike(
$variableAndCallForeach->getFunctionLike(),
$variableAndCallForeach->getVariableName(),
$expectedName,
null
$expectedName
);

// use different variable on purpose to avoid variable re-assign back to false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ private function handleIsset(Isset_ $isset): Expr|int|null
$carry,
$expr
) : $expr,
null,
);
}

Expand Down
2 changes: 2 additions & 0 deletions src/Config/Level/DeadCodeLevel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
use Rector\DeadCode\Rector\If_\RemoveUnusedNonEmptyArrayBeforeForeachRector;
use Rector\DeadCode\Rector\If_\SimplifyIfElseWithSameContentRector;
use Rector\DeadCode\Rector\If_\UnwrapFutureCompatibleIfPhpVersionRector;
use Rector\DeadCode\Rector\MethodCall\RemoveNullArgOnNullDefaultParamRector;
use Rector\DeadCode\Rector\Node\RemoveNonExistingVarAnnotationRector;
use Rector\DeadCode\Rector\Plus\RemoveDeadZeroAndOneOperationRector;
use Rector\DeadCode\Rector\Property\RemoveUnusedPrivatePropertyRector;
Expand Down Expand Up @@ -146,6 +147,7 @@ final class DeadCodeLevel
RemoveDeadReturnRector::class,

RemoveArgumentFromDefaultParentCallRector::class,
RemoveNullArgOnNullDefaultParamRector::class,
NarrowTooWideReturnTypeRector::class,
];
}
4 changes: 1 addition & 3 deletions src/Configuration/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ public function createForTests(array $paths): Configuration
false,
null,
false,
false,
null,
null
false
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function map($arrayItemNode): ArrayItem
$valueExpr = $this->annotationToAttributeMapper->map($arrayItemNode->value);

if ($valueExpr === DocTagNodeState::REMOVE_ARRAY) {
return new ArrayItem(new String_($valueExpr), null);
return new ArrayItem(new String_($valueExpr));
}

if ($arrayItemNode->key !== null) {
Expand Down