Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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