protected function printBlock(array $lines, $style, $firstBlock = false)
    {
        /** @var FormatterHelper $formatter */
        $formatter = $this->getHelper('formatter');

        // just to satisfy my obsessive needs.
        if ($firstBlock) {
            // prints an empty line at the begging of output.
            $this->line('');
        }

        // merge argument lines with an empty line before and after.
        $spacedLines = array_merge([''], array_merge($lines, ['']));
        // generate a text block.
        $block = $formatter->formatBlock($spacedLines, $style);

        // print it.
        $this->line($block);

        // empty ending line.
        $this->line('');
    }
protected function printBlock(array $lines, $style, $firstBlock = false)
    {
        /** @var FormatterHelper $formatter */
        $formatter = $this->getHelper('formatter');

        // just to satisfy my obsessive needs.
        if ($firstBlock) {
            // prints an empty line at the begging of output.
            $this->line('');
        }

        // merge argument lines with an empty line before and after.
        $spacedLines = array_merge([''], array_merge($lines, ['']));
        // generate a text block.
        $block = $formatter->formatBlock($spacedLines, $style);

        // print it.
        $this->line($block);

        // empty ending line.
        $this->line('');
    }
protected function printBlock ( array $ lines , $ style , $ firstBlock = false ) { /** @var FormatterHelper $formatter */ $ formatter = $ this -> getHelper ( 'formatter' ) ; // just to satisfy my obsessive needs. if ( $ firstBlock ) { // prints an empty line at the begging of output. $ this -> line ( '' ) ; } // merge argument lines with an empty line before and after. $ spacedLines = array_merge ( [ '' ] , array_merge ( $ lines , [ '' ] ) ) ; // generate a text block. $ block = $ formatter -> formatBlock ( $ spacedLines , $ style ) ; // print it. $ this -> line ( $ block ) ; // empty ending line. $ this -> line ( '' ) ; }
Prints a text block into console output.

@param array $lines
@param $style
@param bool $firstBlock
Prints a text block into console output .