/** * @inheritdoc */ public function format(MessageBag $bag) { $output = []; foreach ($bag->getAll() as $message) { $output[] = sprintf("[%s] %s", $this->formatType($message), $message->format(true)); } return implode(PHP_EOL, $output); }
/** * @codeCoverageIgnore * @param MessageBag $bag * @return void */ protected function updateCounters(MessageBag $bag) { $this->messageCounter["normal"] += count($bag->getNormalMessages()); $this->messageCounter["warning"] += count($bag->getWarnings()); $this->messageCounter["error"] += count($bag->getErrors()); }