You are here

public function Issue::addAffectedFile in Drupal 7 to 8/9 Module Upgrader 8

Marks a particular file as being affected by this issue.

Parameters

string $file: The path of the affected file.

\Drupal\drupalmoduleupgrader\AnalyzerInterface $detector: The plugin which detected the problem.

Return value

$this

Overrides IssueInterface::addAffectedFile

File

src/Issue.php, line 119

Class

Issue

Namespace

Drupal\drupalmoduleupgrader

Code

public function addAffectedFile($file, AnalyzerInterface $detector) {
  if (empty($this->violations[$file])) {
    $this->violations[$file] = [];
  }
  $this
    ->addDetector($detector);
  return $this;
}