PhpGitHooks\Module\Git\Service\PreCommitOutputWriter::getMessage PHP Method

getMessage() public method

public getMessage ( ) : string
return string
    public function getMessage()
    {
        $maxLength = 50;
        $message = $this->message;
        $restLength = $maxLength - strlen($message);
        for ($i = 0; $restLength > $i; ++$i) {
            $message .= '.';
        }
        return sprintf('<info>%s</info>', $message);
    }

Usage Example

Esempio n. 1
0
 /**
  * @param array  $files
  * @param string $errorMessage
  *
  * @throws ComposerFilesNotFoundException
  */
 public function execute(array $files, $errorMessage)
 {
     $composerFilesResponse = $this->getComposerFilesResponse($files);
     $this->outputMessage = new PreCommitOutputWriter(self::CHECKING_MESSAGE);
     if (true === $composerFilesResponse->isExists()) {
         $this->output->write($this->outputMessage->getMessage());
         $this->executeTool($composerFilesResponse->isJsonFile(), $composerFilesResponse->isLockFile(), $errorMessage);
         $this->output->writeln($this->outputMessage->getSuccessfulMessage());
     }
 }
All Usage Examples Of PhpGitHooks\Module\Git\Service\PreCommitOutputWriter::getMessage