| 1 | <?php |
||
| 9 | abstract class CliReporter implements Reporter |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var OutputInterface |
||
| 13 | */ |
||
| 14 | protected $output; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var Retriever |
||
| 18 | */ |
||
| 19 | protected $retriever; |
||
| 20 | |||
| 21 | public function setResponseRetriever(Retriever $retriever) |
||
| 25 | |||
| 26 | protected function setOutputInterface(OutputInterface $output) |
||
| 30 | |||
| 31 | protected function renderFailure(Result $result) |
||
| 32 | { |
||
| 33 | $this->output->writeln(' <error> ' . $result->getUrl() . ' </error> coming from ' . (string) $this->retriever->getComingFrom($result->getUrl())); |
||
| 34 | foreach ($result->getMessages() as $ruleName => $message) { |
||
| 35 | $this->output->writeln(' - ' . $message . " [rule: $ruleName]"); |
||
| 36 | } |
||
| 37 | $this->output->writeln(''); |
||
| 38 | } |
||
| 39 | |||
| 40 | protected function renderSuccess(Result $result) |
||
| 44 | } |
||
| 45 |