protected function printErrorLevel(Output $output) { $fatals = $output->getMessageCount(Output::FATAL); $errors = $output->getMessageCount(Output::ERROR); $warnings = $output->getMessageCount(Output::WARNING); $notices = $output->getMessageCount(Output::NOTICE); if ($fatals > $this->numFatal) { $this->output->write("<fatal>F</fatal>"); } else { if ($errors > $this->numError) { $this->output->write("<error>E</error>"); } else { if ($warnings > $this->numWarning) { $this->output->write("<warning>W</warning>"); } else { if ($notices > $this->numNotice) { $this->output->write("<notice>N</notice>"); } else { $this->output->write("."); } } } } $this->progress++; if ($this->progress % (79 - $this->progressLength) == 0) { $this->output->write(' ' . sprintf('%' . strlen($this->maxProgress) . 's', $this->progress)); $this->output->write(' / ' . $this->maxProgress); $this->output->writeln(' (' . sprintf('%3s', floor(100 * ($this->progress / $this->maxProgress))) . '%)'); } $this->numFatal = $fatals; $this->numError = $errors; $this->numWarning = $warnings; $this->numNotice = $notices; }