Code Duplication    Length = 10-13 lines in 4 locations

app/Vendor/PHPExcel/PHPExcel/Shared/PCLZip/pclzip.lib.php 4 locations

@@ 3179-3188 (lines=10) @@
3176
3177
    // ----- Go to beginning of Central Dir
3178
    @rewind($this->zip_fd);
3179
    if (@fseek($this->zip_fd, $v_central_dir['offset']))
3180
    {
3181
      $this->privSwapBackMagicQuotes();
3182
3183
      // ----- Error log
3184
      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
3185
3186
      // ----- Return
3187
      return PclZip::errorCode();
3188
    }
3189
3190
    // ----- Read each entry
3191
    for ($i=0; $i<$v_central_dir['entries']; $i++)
@@ 3334-3345 (lines=12) @@
3331
3332
      // ----- Read next Central dir entry
3333
      @rewind($this->zip_fd);
3334
      if (@fseek($this->zip_fd, $v_pos_entry))
3335
      {
3336
        // ----- Close the zip file
3337
        $this->privCloseFd();
3338
        $this->privSwapBackMagicQuotes();
3339
3340
        // ----- Error log
3341
        PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
3342
3343
        // ----- Return
3344
        return PclZip::errorCode();
3345
      }
3346
3347
      // ----- Read the file header
3348
      $v_header = array();
@@ 3495-3507 (lines=13) @@
3492
3493
        // ----- Go to the file position
3494
        @rewind($this->zip_fd);
3495
        if (@fseek($this->zip_fd, $v_header['offset']))
3496
        {
3497
          // ----- Close the zip file
3498
          $this->privCloseFd();
3499
3500
          $this->privSwapBackMagicQuotes();
3501
3502
          // ----- Error log
3503
          PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
3504
3505
          // ----- Return
3506
          return PclZip::errorCode();
3507
        }
3508
3509
        // ----- Look for extraction as string
3510
        if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) {
@@ 4709-4719 (lines=11) @@
4706
    // ----- Start at beginning of Central Dir
4707
    $v_pos_entry = $v_central_dir['offset'];
4708
    @rewind($this->zip_fd);
4709
    if (@fseek($this->zip_fd, $v_pos_entry))
4710
    {
4711
      // ----- Close the zip file
4712
      $this->privCloseFd();
4713
4714
      // ----- Error log
4715
      PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size');
4716
4717
      // ----- Return
4718
      return PclZip::errorCode();
4719
    }
4720
4721
    // ----- Read each entry
4722
    $v_header_list = array();