Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel5.php 2 locations

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