Coseva\CSV::_flushEmptyRow PHP Method

_flushEmptyRow() private method

Flush a row if it's empty.
private _flushEmptyRow ( mixed $row, mixed $index, boolean $trim = false ) : void
$row mixed the row to flush
$index mixed the index of the row
$trim boolean whether or not to trim the data.
return void
    private function _flushEmptyRow($row, $index, $trim = false)
    {
        // If the row is scalar, let's trim it first.
        if ($trim && is_scalar($row)) {
            $row = trim($row);
        }
        // Remove any rows that appear empty.
        if (empty($row)) {
            unset($this->_rows[$index], $row, $index);
        }
    }