convert single case switch to if statement

This commit is contained in:
Sarah Hoffmann
2021-07-11 23:48:16 +02:00
parent 128ca800cd
commit bc5e15996a

View File

@@ -100,12 +100,8 @@ function getCmdOpt($aArg, $aSpec, &$aResult, $bExitOnError = false, $bExitOnUnkn
if ($aCounts[$aLine[0]] > $aLine[3]) {
showUsage($aSpec, $bExitOnError, 'Option \''.$aLine[0].'\' is pressent too many times');
}
switch ($aLine[6]) {
case 'bool':
if (!array_key_exists($aLine[0], $aResult)) {
$aResult[$aLine[0]] = false;
}
break;
if ($aLine[6] == 'bool' && !array_key_exists($aLine[0], $aResult)) {
$aResult[$aLine[0]] = false;
}
}
}