]> git.openstreetmap.org Git - nominatim.git/commitdiff
convert single case switch to if statement
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 11 Jul 2021 21:48:16 +0000 (23:48 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 12 Jul 2021 09:28:47 +0000 (11:28 +0200)
lib-php/cmd.php

index 07000478082d9b3746261fd9ab5c072e38bdbdad..a52e8fcee0c6563c971733dd002139ed92958070 100644 (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;
             }
         }
     }