Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 3072-3094 (lines=23) @@
3069
    /**
3070
     * Read HORIZONTALPAGEBREAKS record.
3071
     */
3072
    private function readHorizontalPageBreaks()
3073
    {
3074
        $length = self::getInt2d($this->data, $this->pos + 2);
3075
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3076
3077
        // move stream pointer to next record
3078
        $this->pos += 4 + $length;
3079
3080
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3081
            // offset: 0; size: 2; number of the following row index structures
3082
            $nm = self::getInt2d($recordData, 0);
3083
3084
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3085
            for ($i = 0; $i < $nm; ++$i) {
3086
                $r = self::getInt2d($recordData, 2 + 6 * $i);
3087
                $cf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3088
                $cl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3089
3090
                // not sure why two column indexes are necessary?
3091
                $this->phpSheet->setBreakByColumnAndRow($cf, $r, Worksheet::BREAK_ROW);
3092
            }
3093
        }
3094
    }
3095
3096
    /**
3097
     * Read VERTICALPAGEBREAKS record.
@@ 3099-3121 (lines=23) @@
3096
    /**
3097
     * Read VERTICALPAGEBREAKS record.
3098
     */
3099
    private function readVerticalPageBreaks()
3100
    {
3101
        $length = self::getInt2d($this->data, $this->pos + 2);
3102
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3103
3104
        // move stream pointer to next record
3105
        $this->pos += 4 + $length;
3106
3107
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3108
            // offset: 0; size: 2; number of the following column index structures
3109
            $nm = self::getInt2d($recordData, 0);
3110
3111
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3112
            for ($i = 0; $i < $nm; ++$i) {
3113
                $c = self::getInt2d($recordData, 2 + 6 * $i);
3114
                $rf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3115
                $rl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3116
3117
                // not sure why two row indexes are necessary?
3118
                $this->phpSheet->setBreakByColumnAndRow($c, $rf, Worksheet::BREAK_COLUMN);
3119
            }
3120
        }
3121
    }
3122
3123
    /**
3124
     * Read HEADER record.