Code Duplication    Length = 9-16 lines in 3 locations

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

@@ 3737-3745 (lines=9) @@
3734
        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
3735
        // For historical reason first PclZip implementation does not stop
3736
        // when this kind of error occurs.
3737
        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
3738
		    && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
3739
3740
            PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY,
3741
			                     "Filename '".$p_entry['filename']."' is "
3742
								 ."already used by an existing directory");
3743
3744
            return PclZip::errorCode();
3745
		    }
3746
      }
3747
      // ----- Look if file is write protected
3748
      else if (!is_writeable($p_entry['filename']))
@@ 3757-3765 (lines=9) @@
3754
        // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
3755
        // For historical reason first PclZip implementation does not stop
3756
        // when this kind of error occurs.
3757
        if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
3758
		    && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
3759
3760
            PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
3761
			                     "Filename '".$p_entry['filename']."' exists "
3762
								 ."and is write protected");
3763
3764
            return PclZip::errorCode();
3765
		    }
3766
      }
3767
3768
      // ----- Look if the extracted file is older
@@ 3775-3790 (lines=16) @@
3772
        if (   (isset($p_options[PCLZIP_OPT_REPLACE_NEWER]))
3773
		    && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) {
3774
	  	  }
3775
		    else {
3776
            $p_entry['status'] = "newer_exist";
3777
3778
            // ----- Look for PCLZIP_OPT_STOP_ON_ERROR
3779
            // For historical reason first PclZip implementation does not stop
3780
            // when this kind of error occurs.
3781
            if (   (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR]))
3782
		        && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) {
3783
3784
                PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL,
3785
			             "Newer version of '".$p_entry['filename']."' exists "
3786
					    ."and option PCLZIP_OPT_REPLACE_NEWER is not selected");
3787
3788
                return PclZip::errorCode();
3789
		      }
3790
		    }
3791
      }
3792
      else {
3793
      }