Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Xls.php 2 locations

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