getNodes() public method

public getNodes ( ) : PhpParser\Node[]
return PhpParser\Node[]
Example #1
0
 /**
  * @param Message $message
  *
  * @return string
  */
 private function formatMessage(Message $message)
 {
     $nodes = $this->nodeStatementsRemover->removeInnerStatements($message->getNodes());
     $prettyPrintedNodes = str_replace("\n", "\n    ", $this->prettyPrinter->prettyPrint($nodes));
     $text = $message->getRawText();
     $color = self::$colors[$message->getLevel()];
     if ($color) {
         $text = sprintf('<fg=%s>%s</fg=%s>', $color, $text, $color);
     }
     return sprintf("> Line <fg=cyan>%s</fg=cyan>: %s\n    %s", $message->getLine(), $text, $prettyPrintedNodes);
 }