public function format(array $data, $appendLineBreak = true)
    {
        return implode($this->lineBreak, array_map([$this, 'formatRow'], $data))
            . ($appendLineBreak ? $this->lineBreak : '');
    }
public function format(array $data, $appendLineBreak = true)
    {
        return implode($this->lineBreak, array_map([$this, 'formatRow'], $data))
            . ($appendLineBreak ? $this->lineBreak : '');
    }
public function format ( array $ data , $ appendLineBreak = true ) { return implode ( $ this -> lineBreak , array_map ( [ $ this , 'formatRow' ] , $ data ) ) . ( $ appendLineBreak ? $ this -> lineBreak : '' ) ; }
Format an array of rows as a CSV spreadsheet.

@param array $data
An array of rows. Each row is an array of cells (hopefully the same
number in each row). Each cell must be a string, or a type that can
be cast to a string.
@param bool  $appendLineBreak
Whether to add a line break at the end of the final row.

@return string
Format an array of rows as a CSV spreadsheet .