Box\Spout\Reader\XLSX\RowIterator::current PHP Method

current() public method

Return the current element, either an empty row or from the buffer.
public current ( ) : array | null
return array | null
    public function current()
    {
        $rowDataForRowToBeProcessed = $this->rowDataBuffer;
        if ($this->shouldPreserveEmptyRows) {
            // when we need to preserve empty rows, we will either return
            // an empty row or the last row read. This depends whether the
            // index of last row that was read matches the index of the last
            // row whose value should be returned.
            if ($this->lastRowIndexProcessed !== $this->nextRowIndexToBeProcessed) {
                // return empty row if mismatch between last processed row
                // and the row that needs to be returned
                $rowDataForRowToBeProcessed = [''];
            }
        }
        return $rowDataForRowToBeProcessed;
    }