3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
7 use Pharborist\Objects\ObjectMethodCallNode;
11 * id = "form_set_value",
12 * description = @Translation("Rewrites calls to form_set_value().")
15 class FormSetValue extends FunctionCallModifier {
20 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
21 $arguments = $call->getArguments();
23 return ObjectMethodCallNode::create($arguments[2]->remove(), 'setValueForElement')
24 ->appendArgument(clone $arguments[0])
25 ->appendArgument(clone $arguments[1]);