Пример #1
0
 /**
  * @param InputInterface $input
  *
  * @throws InvalidCommitMessageException
  */
 public function run(InputInterface $input)
 {
     /** @var ConfigurationDataResponse $configurationDataResponse */
     $configurationDataResponse = $this->queryBus->handle(new ConfigurationDataFinderQuery());
     if (true === $configurationDataResponse->getCommitMsg()->isCommitMsg()) {
         $commitContent = $this->commitMessageFinder->find($input->getFirstArgument());
         $validMessage = $this->isValidCommitMessage($configurationDataResponse->getCommitMsg()->getRegularExpression(), $commitContent);
         if (false === $validMessage) {
             throw new InvalidCommitMessageException();
         }
     }
 }