public function Classes::addFile in Drupal 7 to 8/9 Module Upgrader 8
Overrides IndexerInterface::addFile
File
- src/
Plugin/ DMU/ Indexer/ Classes.php, line 24
Class
- Classes
- Plugin annotation @Indexer( id = "class" )
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\IndexerCode
public function addFile($path) {
$doc = Parser::parseFile($path);
$doc
->find(Filter::isInstanceOf('\\Pharborist\\Objects\\ClassNode'))
->each([
$this,
'add',
]);
$doc
->find(Filter::isInstanceOf('\\Pharborist\\Objects\\NewNode'))
->each([
$this,
'add',
]);
}