Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

@@ 3040-3062 (lines=23) @@
3037
    /**
3038
     * Read HORIZONTALPAGEBREAKS record
3039
     */
3040
    private function readHorizontalPageBreaks()
3041
    {
3042
        $length = self::getInt2d($this->data, $this->pos + 2);
3043
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3044
3045
        // move stream pointer to next record
3046
        $this->pos += 4 + $length;
3047
3048
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3049
            // offset: 0; size: 2; number of the following row index structures
3050
            $nm = self::getInt2d($recordData, 0);
3051
3052
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3053
            for ($i = 0; $i < $nm; ++$i) {
3054
                $r = self::getInt2d($recordData, 2 + 6 * $i);
3055
                $cf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3056
                $cl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3057
3058
                // not sure why two column indexes are necessary?
3059
                $this->phpSheet->setBreakByColumnAndRow($cf, $r, \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_ROW);
3060
            }
3061
        }
3062
    }
3063
3064
    /**
3065
     * Read VERTICALPAGEBREAKS record
@@ 3067-3089 (lines=23) @@
3064
    /**
3065
     * Read VERTICALPAGEBREAKS record
3066
     */
3067
    private function readVerticalPageBreaks()
3068
    {
3069
        $length = self::getInt2d($this->data, $this->pos + 2);
3070
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3071
3072
        // move stream pointer to next record
3073
        $this->pos += 4 + $length;
3074
3075
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3076
            // offset: 0; size: 2; number of the following column index structures
3077
            $nm = self::getInt2d($recordData, 0);
3078
3079
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3080
            for ($i = 0; $i < $nm; ++$i) {
3081
                $c = self::getInt2d($recordData, 2 + 6 * $i);
3082
                $rf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3083
                $rl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3084
3085
                // not sure why two row indexes are necessary?
3086
                $this->phpSheet->setBreakByColumnAndRow($c, $rf, \PhpOffice\PhpSpreadsheet\Worksheet::BREAK_COLUMN);
3087
            }
3088
        }
3089
    }
3090
3091
    /**
3092
     * Read HEADER record