Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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