Code Duplication    Length = 3-3 lines in 2 locations

src/PhpSpreadsheet/Worksheet/RowCellIterator.php 2 locations

@@ 154-156 (lines=3) @@
151
     */
152
    public function next()
153
    {
154
        do {
155
            ++$this->currentColumnIndex;
156
        } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex <= $this->endColumnIndex));
157
    }
158
159
    /**
@@ 169-171 (lines=3) @@
166
        if ($this->currentColumnIndex <= $this->startColumnIndex) {
167
            throw new PhpSpreadsheetException('Column is already at the beginning of range (' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ' - ' . Coordinate::stringFromColumnIndex($this->endColumnIndex) . ')');
168
        }
169
        do {
170
            --$this->currentColumnIndex;
171
        } while (($this->onlyExistingCells) && (!$this->worksheet->cellExistsByColumnAndRow($this->currentColumnIndex, $this->rowIndex)) && ($this->currentColumnIndex >= $this->startColumnIndex));
172
    }
173
174
    /**