You are here

class Analyzer in Drupal 7 to 8/9 Module Upgrader 8

Defines a Plugin annotation object for DMU analyzer plugins.

Analyzers scan a target module's code to determine if any problems exist. If any do exist, it's the analyzer's job to file an issue detailing the nature of the problem -- summarizing the issue, pointing out where the problem is found, and referring the developer to documentation on drupal.org explaining how to fix the problem.

Plugin Namespace: Plugin\DMU\Analyzer

Hierarchy

Expanded class hierarchy of Analyzer

1 string reference to 'Analyzer'
drupalmoduleupgrader.services.yml in ./drupalmoduleupgrader.services.yml
drupalmoduleupgrader.services.yml
10 classes are annotated with Analyzer
DB in src/Plugin/DMU/Analyzer/DB.php
Plugin annotation @Analyzer( id = "_db", message = @Translation("Certain database tables have been removed."), tags = { "category" = { "db" } }, deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\DBDeriver" )
FlagHook in src/Plugin/DMU/Analyzer/FlagHook.php
Plugin annotation @Analyzer( id = "_flag_hook", deriver = "\Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FlagHookDeriver" )
FunctionCall in src/Plugin/DMU/Analyzer/FunctionCall.php
Plugin annotation @Analyzer( id = "_function_call", deriver = "Drupal\drupalmoduleupgrader\Plugin\DMU\Analyzer\FunctionCallDeriver" )
Grep in src/Plugin/DMU/Analyzer/Grep.php
Plugin annotation @Analyzer( id = "grep", description = @Translation("Searches for and replaces commonly-used code that has changed in Drupal 8."), documentation = { { "url" = "https://www.drupal.org/node/2324935", "title" =…
HookFormAlter in src/Plugin/DMU/Analyzer/HookFormAlter.php
Plugin annotation @Analyzer( id = "hook_form_alter", description = @Translation("Checks for outdated hook_form_alter() implementations."), documentation = { { "url" =…

... See full list

File

src/Annotation/Analyzer.php, line 20

Namespace

Drupal\drupalmoduleupgrader\Annotation
View source
class Analyzer extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * A short description of the analysis the plugin performs.
   *
   * @var string
   */
  public $description;

  /**
   * Documentation describing the changes covered by the plugin.
   *
   * Each item in the array should be an array with 'url' and 'title' keys.
   *
   * @var array[]
   */
  public $documentation = [];

  /**
   * The issue title. Markdown and HTML are allowed.
   *
   * @var string
   */
  public $title;

  /**
   * An optional detailed summary of the issue. Markdown and HTML are allowed.
   *
   * @var string
   */
  public $summary;

  /**
   * The default tags to be applied to flagged issues.
   *
   * Tags are fairly arbitrary and can be any value.
   * Tags are divided into groups (i.e., the keys of this here array).
   *
   * @var array
   */
  public $tags = [];

}

Members

Namesort descending Modifiers Type Description Overrides
Analyzer::$description public property A short description of the analysis the plugin performs.
Analyzer::$documentation public property Documentation describing the changes covered by the plugin.
Analyzer::$id public property The plugin ID.
Analyzer::$summary public property An optional detailed summary of the issue. Markdown and HTML are allowed.
Analyzer::$tags public property The default tags to be applied to flagged issues.
Analyzer::$title public property The issue title. Markdown and HTML are allowed.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2