3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions;
5 use Drupal\drupalmoduleupgrader\TargetInterface;
6 use Pharborist\Functions\FunctionCallNode;
7 use Pharborist\Types\StringNode;
12 * deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Converter\Functions\DBDeriver"
15 class DB extends FunctionCallModifier {
18 * Tables which will cause the function call to be commented out.
22 protected static $forbiddenTables = ['system', 'variable'];
27 public function rewrite(FunctionCallNode $call, TargetInterface $target) {
28 $table = $call->getArgumentList()->getItem(0);
29 return ($table instanceof StringNode && in_array($table->toValue(), self::$forbiddenTables)) ? NULL : $call;