Code Duplication    Length = 25-25 lines in 2 locations

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

@@ 346-370 (lines=25) @@
343
    $p_result_list = array();
344
    
345
    // ----- Look if the $p_filelist is really an array
346
    if (is_array($p_filelist)) {
347
    
348
      // ----- Look if the first element is also an array
349
      //       This will mean that this is a file description entry
350
      if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
351
        $v_att_list = $p_filelist;
352
      }
353
      
354
      // ----- The list is a list of string names
355
      else {
356
        $v_string_list = $p_filelist;
357
      }
358
    }
359
360
    // ----- Look if the $p_filelist is a string
361
    else if (is_string($p_filelist)) {
362
      // ----- Create a list from the string
363
      $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
364
    }
365
366
    // ----- Invalid variable type for $p_filelist
367
    else {
368
      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist");
369
      return 0;
370
    }
371
    
372
    // ----- Reformat the string list
373
    if (sizeof($v_string_list) != 0) {
@@ 533-557 (lines=25) @@
530
    $p_result_list = array();
531
    
532
    // ----- Look if the $p_filelist is really an array
533
    if (is_array($p_filelist)) {
534
    
535
      // ----- Look if the first element is also an array
536
      //       This will mean that this is a file description entry
537
      if (isset($p_filelist[0]) && is_array($p_filelist[0])) {
538
        $v_att_list = $p_filelist;
539
      }
540
      
541
      // ----- The list is a list of string names
542
      else {
543
        $v_string_list = $p_filelist;
544
      }
545
    }
546
547
    // ----- Look if the $p_filelist is a string
548
    else if (is_string($p_filelist)) {
549
      // ----- Create a list from the string
550
      $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist);
551
    }
552
553
    // ----- Invalid variable type for $p_filelist
554
    else {
555
      PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist");
556
      return 0;
557
    }
558
    
559
    // ----- Reformat the string list
560
    if (sizeof($v_string_list) != 0) {