/**
  * @param InputInterface  $input
  * @param OutputInterface $output
  *
  * @throws \PhpGitHooks\Application\CommitMessage\InvalidCommitMessageException
  */
 public function doRun(InputInterface $input, OutputInterface $output)
 {
     /** @var CommitMessageValidator  $commitMessageValidator */
     $commitMessageValidator = $this->container->get('commit.message.validator');
     $commitMessageValidator->setInput($input);
     $commitMessageValidator->setOutput($output);
     $commitMessageValidator->validate();
 }
 public static function buildConfig(Event $event)
 {
     if (true === $event->isDevMode()) {
         $container = new Container();
         /** @var ConfiguratorProcessor $processor */
         $processor = $container->get('configurator.processor');
         $processor->setIO($event->getIO());
         return $processor->process();
     }
 }
 private function execute()
 {
     if (true === $this->isProcessingAnyComposerFile()) {
         $this->container->get('check.composer.files.pre.commit.executor')->run($this->output, $this->files);
     }
     if (true === $this->isProcessingAnyJsonFile()) {
         $this->container->get('check.json.syntax.pre.commit.executor')->run($this->output, $this->files, self::JSON_FILES_IN_SRC);
     }
     if (true === $this->isProcessingAnyPhpFile()) {
         $this->container->get('check.php.syntax.lint.pre.commit.executor')->run($this->output, $this->files);
         /** @var FixCodeStyleCsFixerPreCommitExecutor $csFixer */
         $csFixer = $this->container->get('fix.code.style.cs.fixer.pre.commit.executor');
         $csFixer->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         /** @var CheckCodeStyleCodeSnifferPreCommitExecutor $codeSniffer */
         $codeSniffer = $this->container->get('check.code.style.code.sniffer.pre.commit.executor');
         $codeSniffer->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         $this->container->get('check.php.mess.detection.pre.commit.executor')->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         $this->container->get('unit.test.pre.commit.executor')->run($this->output);
     }
 }
 private function execute()
 {
     if ($this->isProcessingAnyComposerFile()) {
         $this->container->get('check.composer.files.pre.commit.executer')->run($this->output, $this->files);
     }
     if ($this->isProcessingAnyPhpFile()) {
         $this->container->get('check.php.syntax.lint.pre.commit.executer')->run($this->output, $this->files);
         $this->container->get('fix.code.style.cs.fixer.pre.commit.executer')->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         $this->container->get('check.code.style.code.sniffer.pre.commit.executer')->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         $this->container->get('check.php.mess.detection.pre.commit.executer')->run($this->output, $this->files, self::PHP_FILES_IN_SRC);
         $this->container->get('unit.test.pre.commit.executer')->run($this->output);
     }
 }