PhpGitHooks\Module\PhpLint\Model\PhpLintToolProcessorInterface::process PHP Метод

process() публичный Метод

public process ( string $file )
$file string
    public function process($file);

Usage Example

Пример #1
0
 /**
  * @param array $files
  * @param string $errorMessage
  *
  * @throws PhpLintViolationsException
  */
 public function execute(array $files, $errorMessage)
 {
     $outputMessage = new PreCommitOutputWriter(self::RUNNING_PHPLINT);
     $this->output->write($outputMessage->getMessage());
     $errors = [];
     foreach ($files as $file) {
         $errors[] = $this->phpLintTool->process($file);
     }
     $errors = array_filter($errors);
     if (!empty($errors)) {
         $this->output->writeln($outputMessage->getFailMessage());
         $this->output->writeln($outputMessage->setError(implode('', $errors)));
         $this->output->writeln(BadJobLogoResponse::paint($errorMessage));
         throw new PhpLintViolationsException();
     }
     $this->output->writeln($outputMessage->getSuccessfulMessage());
 }
PhpLintToolProcessorInterface