Skip to content

Commit f3afd0c

Browse files
committed
clean clone usage
1 parent 9b77861 commit f3afd0c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

rules/DowngradePhp85/Rector/StmtsAwareInterface/DowngradePipeOperatorRector.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,13 @@ private function createFunctionCall(Node $node, array $arguments): Node
244244
}
245245

246246
if ($node instanceof MethodCall) {
247-
$clonedMethodCall = clone $node;
248-
$clonedMethodCall->args = $this->nodeFactory->createArgs($arguments);
249-
return $clonedMethodCall;
247+
$node->args = $this->nodeFactory->createArgs($arguments);
248+
return $node;
250249
}
251250

252251
if ($node instanceof StaticCall) {
253-
$clonedStaticCall = clone $node;
254-
$clonedStaticCall->args = $this->nodeFactory->createArgs($arguments);
255-
return $clonedStaticCall;
252+
$node->args = $this->nodeFactory->createArgs($arguments);
253+
return $node;
256254
}
257255

258256
return new FuncCall($node, $this->nodeFactory->createArgs($arguments));

0 commit comments

Comments
 (0)