Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function rewrite(FunctionCallNode $call, TargetInterface $target)
 {
     $table = $call->getArgumentList()->getItem(0);
     return $table instanceof StringNode && in_array($table->toValue(), self::$forbiddenTables) ? NULL : $call;
 }
 /**
  * {@inheritdoc}
  */
 public function rewrite(FunctionCallNode $call, TargetInterface $target)
 {
     return ClassMethodCallNode::create('\\Drupal', 'service')->appendArgument('user.tempstore')->appendMethodCall('get')->appendArgument(clone $call->getArgumentList()->getItem(1));
 }
 /**
  * {@inheritdoc}
  */
 public function rewrite(FunctionCallNode $call, TargetInterface $target)
 {
     return ObjectMethodCallNode::create(clone $call->getArgumentList()->getItem(0), 'save');
 }