Code Duplication    Length = 30-32 lines in 2 locations

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

@@ 3403-3434 (lines=32) @@
3400
      */
3401
3402
      // ----- Look for extract by preg rule
3403
      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
3404
               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
3405
3406
          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) {
3407
              $v_extract = true;
3408
          }
3409
      }
3410
3411
      // ----- Look for extract by index rule
3412
      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
3413
               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
3414
          
3415
          // ----- Look if the index is in the list
3416
          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_extract); $j++) {
3417
3418
              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
3419
                  $v_extract = true;
3420
              }
3421
              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
3422
                  $j_start = $j+1;
3423
              }
3424
3425
              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
3426
                  break;
3427
              }
3428
          }
3429
      }
3430
3431
      // ----- Look for no rule, which means extract all the archive
3432
      else {
3433
          $v_extract = true;
3434
      }
3435
3436
	  // ----- Check compression method
3437
	  if (   ($v_extract)
@@ 4784-4813 (lines=30) @@
4781
      */
4782
4783
      // ----- Look for extract by preg rule
4784
      else if (   (isset($p_options[PCLZIP_OPT_BY_PREG]))
4785
               && ($p_options[PCLZIP_OPT_BY_PREG] != "")) {
4786
4787
          if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) {
4788
              $v_found = true;
4789
          }
4790
      }
4791
4792
      // ----- Look for extract by index rule
4793
      else if (   (isset($p_options[PCLZIP_OPT_BY_INDEX]))
4794
               && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) {
4795
4796
          // ----- Look if the index is in the list
4797
          for ($j=$j_start; ($j<sizeof($p_options[PCLZIP_OPT_BY_INDEX])) && (!$v_found); $j++) {
4798
4799
              if (($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) {
4800
                  $v_found = true;
4801
              }
4802
              if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) {
4803
                  $j_start = $j+1;
4804
              }
4805
4806
              if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) {
4807
                  break;
4808
              }
4809
          }
4810
      }
4811
      else {
4812
      	$v_found = true;
4813
      }
4814
4815
      // ----- Look for deletion
4816
      if ($v_found)