Ejemplo n.º 1
0
 /**
  * @inheritDoc
  */
 public function printContext(ContextInterface $context)
 {
     $this->output->writeln('');
     $this->output->writeln(sprintf('File: %s', $context->getCheckedResourceName()));
     foreach ($context->getMessages() as $message) {
         $nodes = $this->nodeStatementsRemover->removeInnerStatements($message->getNodes());
         $this->output->writeln(sprintf('Line %d. %s: %s', $message->getLine(), $message->getText(), $this->prettyPrinter->prettyPrint($nodes)));
     }
     $this->output->writeln('');
 }
Ejemplo n.º 2
0
 /**
  * {@inheritdoc}
  */
 public function printContext(ContextInterface $context)
 {
     $this->output->writeln('');
     $this->output->writeln(sprintf('File: <fg=cyan>%s</fg=cyan>', $context->getCheckedResourceName()));
     foreach ($context->getMessages() as $message) {
         $this->output->writeln($this->formatMessage($message));
     }
     foreach ($context->getErrors() as $error) {
         $this->output->writeln(sprintf('> <fg=red>%s</fg=red>', $error->getText()));
     }
     $this->output->writeln('');
 }
Ejemplo n.º 3
0
 /**
  * {@inheritdoc}
  */
 public function printContext(ContextInterface $context)
 {
     $this->output->writeln('');
     $this->output->writeln(sprintf('File: <fg=cyan>%s</fg=cyan>', $context->getCheckedResourceName()));
     foreach ($context->getMessages() as $message) {
         $nodes = $this->nodeStatementsRemover->removeInnerStatements($message->getNodes());
         $this->output->writeln(sprintf("> Line <fg=cyan>%s</fg=cyan>: <fg=yellow>%s</fg=yellow>\n    %s", $message->getLine(), $message->getRawText(), str_replace("\n", "\n    ", $this->prettyPrinter->prettyPrint($nodes))));
     }
     foreach ($context->getErrors() as $error) {
         $this->output->writeln(sprintf('> <fg=red>%s</fg=red>', $error->getText()));
     }
     $this->output->writeln('');
 }