Code Duplication    Length = 12-14 lines in 2 locations

src/PhpSpreadsheet/Shared/PCLZip/PclZip.php 2 locations

@@ 1382-1395 (lines=14) @@
1379
                // ----- Look for options that request a path value
1380
                case PCLZIP_OPT_PATH:
1381
                case PCLZIP_OPT_REMOVE_PATH:
1382
                case PCLZIP_OPT_ADD_PATH:
1383
                    // ----- Check the number of parameters
1384
                    if (($i + 1) >= $p_size) {
1385
                        // ----- Error log
1386
                        self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'");
1387
1388
                        // ----- Return
1389
                        return self::errorCode();
1390
                    }
1391
1392
                    // ----- Get the value
1393
                    $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i + 1], false);
1394
                    ++$i;
1395
                    break;
1396
1397
                case PCLZIP_OPT_TEMP_FILE_THRESHOLD:
1398
                    // ----- Check the number of parameters
@@ 1638-1649 (lines=12) @@
1635
                    $v_result_list[$p_options_list[$i]] = true;
1636
                    break;
1637
                // ----- Look for options that request an octal value
1638
                case PCLZIP_OPT_SET_CHMOD:
1639
                    // ----- Check the number of parameters
1640
                    if (($i + 1) >= $p_size) {
1641
                        // ----- Error log
1642
                        self::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '" . PclZipUtilOptionText($p_options_list[$i]) . "'");
1643
                        // ----- Return
1644
                        return self::errorCode();
1645
                    }
1646
                    // ----- Get the value
1647
                    $v_result_list[$p_options_list[$i]] = $p_options_list[$i + 1];
1648
                    ++$i;
1649
                    break;
1650
1651
                // ----- Look for options that request a call-back
1652
                case PCLZIP_CB_PRE_EXTRACT: