/** * @param string $warningMessage */ public function run($warningMessage) { $outputMessage = new PreCommitOutputWriter(self::CHECKING_MESSAGE); $this->output->write($outputMessage->getMessage()); $this->currentCoverage = $this->strictCoverageProcessor->process(); $this->previousCoverage = $this->guardReader->read(); true === $this->isLowerCurrentCoverage() ? $this->output->writeln(sprintf("\n<bg=yellow;options=bold>%s Previous coverage %s, current coverage %s.</>", $warningMessage, $this->previousCoverage, $this->currentCoverage)) : $this->output->writeln($outputMessage->getSuccessfulMessage() . $this->printGuardCoverage()); $this->guardWriter->write($this->currentCoverage); }