You are here

protected function AnalyzerBase::buildIssue in Drupal 7 to 8/9 Module Upgrader 8

Creates an issue with title, summary, documentation and tags pulled from the plugin definition.

Parameters

TargetInterface $target: The target module.

Return value

IssueInterface

7 calls to AnalyzerBase::buildIssue()
DB::analyze in src/Plugin/DMU/Analyzer/DB.php
Analyzes a target module and flags any issues found.
FunctionCall::analyze in src/Plugin/DMU/Analyzer/FunctionCall.php
Analyzes a target module and flags any issues found.
Grep::analyze in src/Plugin/DMU/Analyzer/Grep.php
Analyzes a target module and flags any issues found.
HookFormAlter::analyze in src/Plugin/DMU/Analyzer/HookFormAlter.php
Analyzes a target module and flags any issues found.
HookUninstall::analyze in src/Plugin/DMU/Analyzer/HookUninstall.php
Analyzes a target module and flags any issues found.

... See full list

File

src/AnalyzerBase.php, line 19

Class

AnalyzerBase
Base class for analyzers.

Namespace

Drupal\drupalmoduleupgrader

Code

protected function buildIssue(TargetInterface $target) {
  $issue = new Issue($target, $this->pluginDefinition['message'], $this->pluginDefinition['summary']);
  foreach ($this->pluginDefinition['documentation'] as $doc) {
    $issue
      ->addDocumentation($doc['url'], $doc['title']);
  }
  foreach ($this->pluginDefinition['tags'] as $group => $tag) {
    $issue
      ->setTag($group, $tag);
  }

  // If the plugin definition didn't supply an error_level tag, mark this
  // one as an error.
  if (empty($this->pluginDefinition['tags']['error_level'])) {
    $issue
      ->setTag('error_level', 'error');
  }
  return $issue;
}