Code Duplication    Length = 8-8 lines in 3 locations

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

@@ 4532-4539 (lines=8) @@
4529
    // ----- Go to the end of the zip file
4530
    $v_size = filesize($this->zipname);
4531
    @fseek($this->zip_fd, $v_size);
4532
    if (@ftell($this->zip_fd) != $v_size)
4533
    {
4534
      // ----- Error log
4535
      PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\'');
4536
4537
      // ----- Return
4538
      return PclZip::errorCode();
4539
    }
4540
4541
    // ----- First try : look if this is an archive with no commentaries (most of the time)
4542
    // in this case the end of central dir is at 22 bytes of the file end
@@ 4546-4553 (lines=8) @@
4543
    $v_found = 0;
4544
    if ($v_size > 26) {
4545
      @fseek($this->zip_fd, $v_size-22);
4546
      if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22))
4547
      {
4548
        // ----- Error log
4549
        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
4550
4551
        // ----- Return
4552
        return PclZip::errorCode();
4553
      }
4554
4555
      // ----- Read for bytes
4556
      $v_binary_data = @fread($this->zip_fd, 4);
@@ 4573-4580 (lines=8) @@
4570
      if ($v_maximum_size > $v_size)
4571
        $v_maximum_size = $v_size;
4572
      @fseek($this->zip_fd, $v_size-$v_maximum_size);
4573
      if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size))
4574
      {
4575
        // ----- Error log
4576
        PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\'');
4577
4578
        // ----- Return
4579
        return PclZip::errorCode();
4580
      }
4581
4582
      // ----- Read byte per byte in order to find the signature
4583
      $v_pos = ftell($this->zip_fd);