Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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