Code Duplication    Length = 23-23 lines in 2 locations

src/PhpSpreadsheet/Reader/Excel5.php 2 locations

@@ 3064-3086 (lines=23) @@
3061
    /**
3062
     * Read HORIZONTALPAGEBREAKS record
3063
     */
3064
    private function readHorizontalPageBreaks()
3065
    {
3066
        $length = self::getInt2d($this->data, $this->pos + 2);
3067
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3068
3069
        // move stream pointer to next record
3070
        $this->pos += 4 + $length;
3071
3072
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3073
            // offset: 0; size: 2; number of the following row index structures
3074
            $nm = self::getInt2d($recordData, 0);
3075
3076
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3077
            for ($i = 0; $i < $nm; ++$i) {
3078
                $r = self::getInt2d($recordData, 2 + 6 * $i);
3079
                $cf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3080
                $cl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3081
3082
                // not sure why two column indexes are necessary?
3083
                $this->phpSheet->setBreakByColumnAndRow($cf, $r, \PhpSpreadsheet\Worksheet::BREAK_ROW);
3084
            }
3085
        }
3086
    }
3087
3088
    /**
3089
     * Read VERTICALPAGEBREAKS record
@@ 3091-3113 (lines=23) @@
3088
    /**
3089
     * Read VERTICALPAGEBREAKS record
3090
     */
3091
    private function readVerticalPageBreaks()
3092
    {
3093
        $length = self::getInt2d($this->data, $this->pos + 2);
3094
        $recordData = $this->readRecordData($this->data, $this->pos + 4, $length);
3095
3096
        // move stream pointer to next record
3097
        $this->pos += 4 + $length;
3098
3099
        if ($this->version == self::XLS_BIFF8 && !$this->readDataOnly) {
3100
            // offset: 0; size: 2; number of the following column index structures
3101
            $nm = self::getInt2d($recordData, 0);
3102
3103
            // offset: 2; size: 6 * $nm; list of $nm row index structures
3104
            for ($i = 0; $i < $nm; ++$i) {
3105
                $c = self::getInt2d($recordData, 2 + 6 * $i);
3106
                $rf = self::getInt2d($recordData, 2 + 6 * $i + 2);
3107
                $rl = self::getInt2d($recordData, 2 + 6 * $i + 4);
3108
3109
                // not sure why two row indexes are necessary?
3110
                $this->phpSheet->setBreakByColumnAndRow($c, $rf, \PhpSpreadsheet\Worksheet::BREAK_COLUMN);
3111
            }
3112
        }
3113
    }
3114
3115
    /**
3116
     * Read HEADER record