3 namespace Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer;
5 use Drupal\drupalmoduleupgrader\AnalyzerBase;
6 use Drupal\drupalmoduleupgrader\TargetInterface;
11 * deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FlagHookDeriver"
14 class FlagHook extends AnalyzerBase {
19 public function analyze(TargetInterface $target) {
20 $hook = 'hook_' . $this->pluginDefinition['hook'];
21 $indexer = $target->getIndexer('function');
23 if ($indexer->has($hook)) {
24 return [$this->buildIssue($target)->addViolation($indexer->get($hook), $this)];