/**
  * @param AbstractBlock $block
  * @param CliRenderer   $renderer
  *
  * @return string
  */
 public function render(AbstractBlock $block, CliRenderer $renderer)
 {
     if (!$block instanceof ListBlock) {
         throw new \InvalidArgumentException(sprintf('Incompatible block type: "%s"', get_class($block)));
     }
     return $renderer->renderBlocks($block->children());
 }
 /**
  * @param AbstractBlock $block
  * @param CliRenderer   $renderer
  *
  * @return string
  */
 public function render(AbstractBlock $block, CliRenderer $renderer)
 {
     if (!$block instanceof Document) {
         throw new \InvalidArgumentException(sprintf('Incompatible block type: "%s"', get_class($block)));
     }
     $wholeDoc = $renderer->renderBlocks($block->children());
     return $wholeDoc === '' ? '' : $wholeDoc . "\n";
 }