Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 3208-3230 (lines=23) @@
3205
    /**
3206
     * Read HORIZONTALPAGEBREAKS record.
3207
     */
3208
    private function readHorizontalPageBreaks()
3209
    {
3210
        $length = self::getUInt2d($this->data, $this->pos + 2);
3211
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3212
3213
        // move stream pointer to next record
3214
        $this->pos += 4 + $length;
3215
3216
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3217
            // offset: 0; size: 2; number of the following row index structures
3218
            $nm = self::getUInt2d($recordData, 0);
3219
3220
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3221
            for ($i = 0; $i < $nm; ++$i) {
3222
                $r = self::getUInt2d($recordData, 2 + 6 * $i);
3223
                $cf = self::getUInt2d($recordData, 2 + 6 * $i + 2);
3224
                $cl = self::getUInt2d($recordData, 2 + 6 * $i + 4);
3225
3226
                // not sure why two column indexes are necessary?
3227
                $this->phpSheet->setBreakByColumnAndRow($cf + 1, $r, Worksheet::BREAK_ROW);
3228
            }
3229
        }
3230
    }
3231
3232
    /**
3233
     * Read VERTICALPAGEBREAKS record.
@@ 3235-3257 (lines=23) @@
3232
    /**
3233
     * Read VERTICALPAGEBREAKS record.
3234
     */
3235
    private function readVerticalPageBreaks()
3236
    {
3237
        $length = self::getUInt2d($this->data, $this->pos + 2);
3238
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3239
3240
        // move stream pointer to next record
3241
        $this->pos += 4 + $length;
3242
3243
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3244
            // offset: 0; size: 2; number of the following column index structures
3245
            $nm = self::getUInt2d($recordData, 0);
3246
3247
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3248
            for ($i = 0; $i < $nm; ++$i) {
3249
                $c = self::getUInt2d($recordData, 2 + 6 * $i);
3250
                $rf = self::getUInt2d($recordData, 2 + 6 * $i + 2);
3251
                $rl = self::getUInt2d($recordData, 2 + 6 * $i + 4);
3252
3253
                // not sure why two row indexes are necessary?
3254
                $this->phpSheet->setBreakByColumnAndRow($c + 1, $rf, Worksheet::BREAK_COLUMN);
3255
            }
3256
        }
3257
    }
3258
3259
    /**
3260
     * Read HEADER record.