コード例 #1
0
 /**
  * {@inheritdoc}
  */
 public function rewrite(FunctionCallNode $call, TargetInterface $target)
 {
     $arguments = $call->getArguments();
     $object = strPos($call->getName()->getText(), 'entity_') === 0 ? $arguments[1] : $arguments[0];
     return ObjectMethodCallNode::create(clone $object, $this->pluginDefinition['method']);
 }