Code Duplication    Length = 15-17 lines in 2 locations

main/inc/lib/pclzip/pclzip.lib.php 2 locations

@@ 339-353 (lines=15) @@
336
      // ----- Look for 2 args
337
      // Here we need to support the first historic synopsis of the
338
      // method.
339
      else {
340
341
        // ----- Get the first argument
342
        $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0];
343
344
        // ----- Look for the optional second argument
345
        if ($v_size == 2) {
346
          $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
347
        }
348
        else if ($v_size > 2) {
349
          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER,
350
		                       "Invalid number / type of arguments");
351
          return 0;
352
        }
353
      }
354
    }
355
356
    // ----- Look for default option values
@@ 524-540 (lines=17) @@
521
      // ----- Look for 2 args
522
      // Here we need to support the first historic synopsis of the
523
      // method.
524
      else {
525
526
        // ----- Get the first argument
527
        $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0];
528
529
        // ----- Look for the optional second argument
530
        if ($v_size == 2) {
531
          $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1];
532
        }
533
        else if ($v_size > 2) {
534
          // ----- Error log
535
          PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments");
536
537
          // ----- Return
538
          return 0;
539
        }
540
      }
541
    }
542
543
    // ----- Look for default option values