Code Duplication    Length = 7-7 lines in 3 locations

src/PhpSpreadsheet/Shared/PCLZip/PclZip.php 3 locations

@@ 4163-4169 (lines=7) @@
4160
        // ----- Go to the end of the zip file
4161
        $v_size = filesize($this->zipname);
4162
        @fseek($this->zip_fd, $v_size);
4163
        if (@ftell($this->zip_fd) != $v_size) {
4164
            // ----- Error log
4165
            self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \'' . $this->zipname . '\'');
4166
4167
            // ----- Return
4168
            return self::errorCode();
4169
        }
4170
4171
        // ----- First try : look if this is an archive with no commentaries (most of the time)
4172
        // in this case the end of central dir is at 22 bytes of the file end
@@ 4176-4182 (lines=7) @@
4173
        $v_found = 0;
4174
        if ($v_size > 26) {
4175
            @fseek($this->zip_fd, $v_size - 22);
4176
            if (($v_pos = @ftell($this->zip_fd)) != ($v_size - 22)) {
4177
                // ----- Error log
4178
                self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\'');
4179
4180
                // ----- Return
4181
                return self::errorCode();
4182
            }
4183
4184
            // ----- Read for bytes
4185
            $v_binary_data = @fread($this->zip_fd, 4);
@@ 4203-4209 (lines=7) @@
4200
                $v_maximum_size = $v_size;
4201
            }
4202
            @fseek($this->zip_fd, $v_size - $v_maximum_size);
4203
            if (@ftell($this->zip_fd) != ($v_size - $v_maximum_size)) {
4204
                // ----- Error log
4205
                self::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \'' . $this->zipname . '\'');
4206
4207
                // ----- Return
4208
                return self::errorCode();
4209
            }
4210
4211
            // ----- Read byte per byte in order to find the signature
4212
            $v_pos = ftell($this->zip_fd);