]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ParameterParser.php
PHP linter looks for phpcs.xml by default. Also removed a couple of exceptions that...
[nominatim.git] / lib / ParameterParser.php
index aff2612cdfefe0702ccc6d7f5d146953cb801b1d..0c0471a39b732b185573d51a22295173ede572ec 100644 (file)
@@ -4,12 +4,13 @@ class ParameterParser
 {
     private $aParams;
 
-    function __construct($aParams=NULL)
+
+    function __construct($aParams = null)
     {
-        $this->aParams = ($aParams === NULL) ? $_GET : $aParams;
+        $this->aParams = ($aParams === null) ? $_GET : $aParams;
     }
 
-    function getBool($sName, $bDefault=false)
+    function getBool($sName, $bDefault = false)
     {
         if (!isset($this->aParams[$sName]) || strlen($this->aParams[$sName]) == 0) {
             return $bDefault;
@@ -18,7 +19,7 @@ class ParameterParser
         return (bool) $this->aParams[$sName];
     }
 
-    function getInt($sName, $bDefault=false)
+    function getInt($sName, $bDefault = false)
     {
         if (!isset($this->aParams[$sName]) || strlen($this->aParams[$sName]) == 0) {
             return $bDefault;
@@ -31,7 +32,7 @@ class ParameterParser
         return (int) $this->aParams[$sName];
     }
 
-    function getFloat($sName, $bDefault=false)
+    function getFloat($sName, $bDefault = false)
     {
         if (!isset($this->aParams[$sName]) || strlen($this->aParams[$sName]) == 0) {
             return $bDefault;
@@ -44,7 +45,7 @@ class ParameterParser
         return (float) $this->aParams[$sName];
     }
 
-    function getString($sName, $bDefault=false)
+    function getString($sName, $bDefault = false)
     {
         if (!isset($this->aParams[$sName]) || strlen($this->aParams[$sName]) == 0) {
             return $bDefault;
@@ -53,7 +54,7 @@ class ParameterParser
         return $this->aParams[$sName];
     }
 
-    function getSet($sName, $aValues, $sDefault=false)
+    function getSet($sName, $aValues, $sDefault = false)
     {
         if (!isset($this->aParams[$sName]) || strlen($this->aParams[$sName]) == 0) {
             return $sDefault;
@@ -66,7 +67,7 @@ class ParameterParser
         return $this->aParams[$sName];
     }
 
-    function getStringList($sName, $aDefault=false)
+    function getStringList($sName, $aDefault = false)
     {
         $sValue = $this->getString($sName);
 
@@ -77,9 +78,9 @@ class ParameterParser
         return $aDefault;
     }
 
-    function getPreferredLanguages($sFallback=NULL)
+    function getPreferredLanguages($sFallback = null)
     {
-        if ($sFallback === NULL && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
+        if ($sFallback === null && isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) {
             $sFallback = $_SERVER["HTTP_ACCEPT_LANGUAGE"];
         }