3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
7 use Pharborist\Objects\ObjectMethodCallNode;
12 * description = @Translation("Rewrites calls to user_save()."),
13 * fixme = @Translation("user_save() is now a method of the user entity.")
16 class UserSave extends FunctionCallModifier {
21 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
22 $arguments = $call->getArguments();
24 if (sizeof($arguments) == 1) {
25 return ObjectMethodCallNode::create(clone $arguments[0], 'save');