public function Constants::addFile in Drupal 7 to 8/9 Module Upgrader 8
Overrides IndexerInterface::addFile
File
- src/
Plugin/ DMU/ Indexer/ Constants.php, line 27
Class
- Constants
- Plugin annotation @Indexer( id = "constant" )
Namespace
Drupal\drupalmoduleupgrader\Plugin\DMU\IndexerCode
public function addFile($path) {
Parser::parseFile($path)
->find(Filter::isInstanceOf('\\Pharborist\\Constants\\ConstantNode', '\\Pharborist\\Functions\\DefineNode', '\\Pharborist\\Constants\\ConstantDeclarationNode'))
->each([
$this,
'add',
]);
}