Пример #1
0
 /**
  * {@inheritdoc}
  */
 protected function runLint()
 {
     $reports = [];
     $files = $this->getJarValueOrLocal('files');
     $backupFailOn = $this->getFailOn();
     $this->setFailOn('never');
     foreach ($files as $fileName => $file) {
         if (!is_array($file)) {
             $file = ['fileName' => $fileName, 'content' => $file];
         }
         $this->currentFile = $file;
         $this->setStdinPath($fileName);
         $lintExitCode = $this->lintExitCode;
         parent::runLint();
         $this->lintExitCode = max($lintExitCode, $this->lintExitCode);
         if ($this->report) {
             $reports[] = $this->report;
         }
     }
     $this->setFailOn($backupFailOn);
     $this->report = Utils::mergeReports($reports);
     $this->reportRaw = json_encode($this->report);
     return $this;
 }