public function FunctionCalls::get in Drupal 7 to 8/9 Module Upgrader 8
Overrides IndexerInterface::get
File
- src/
Plugin/ DMU/ Indexer/ FunctionCalls.php, line 41
Class
- FunctionCalls
- Plugin annotation @Indexer( id = "function_call", description = @Translation("Indexes all function calls in a target module."), exclude = { "t" } )
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\IndexerCode
public function get($id) {
$all = new NodeCollection([]);
$files = $this
->getQuery([
'file',
])
->distinct(TRUE)
->condition('id', $id)
->execute()
->fetchCol();
array_walk($files, function ($file) use ($all, $id) {
$all
->add($this->target
->open($file)
->find(Filter::isFunctionCall($id)));
});
return $all;
}