]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/Geocode.php
Merge pull request #522 from mtmail/PSR2-arrays
[nominatim.git] / lib / Geocode.php
index 945d9d1b97588c6def8f73469a1861e3a8588823..b0fdb0f12d3f13c47c4baa4e6d8790366196f57c 100644 (file)
@@ -258,8 +258,12 @@ class Geocode
         } else {
             $aViewbox = $oParams->getStringList('viewbox');
             if ($aViewbox) {
-                $this->setViewBox(array($aViewbox[0], $aViewbox[3],
-                                        $aViewbox[2], $aViewbox[1]));
+                $this->setViewBox(array(
+                                   $aViewbox[0],
+                                   $aViewbox[3],
+                                   $aViewbox[2],
+                                   $aViewbox[1]
+                                  ));
             } else {
                 $aRoute = $oParams->getStringList('route');
                 $fRouteWidth = $oParams->getFloat('routewidth');
@@ -771,24 +775,25 @@ class Geocode
         if ($sQuery || $this->aStructuredQuery) {
             // Start with a blank search
             $aSearches = array(
-                array('iSearchRank' => 0,
-                            'iNamePhrase' => -1,
-                            'sCountryCode' => false,
-                            'aName' => array(),
-                            'aAddress' => array(),
-                            'aFullNameAddress' => array(),
-                            'aNameNonSearch' => array(),
-                            'aAddressNonSearch' => array(),
-                            'sOperator' => '',
-                            'aFeatureName' => array(),
-                            'sClass' => '',
-                            'sType' => '',
-                            'sHouseNumber' => '',
-                            'fLat' => '',
-                            'fLon' => '',
-                            'fRadius' => ''
-                        )
-            );
+                          array(
+                           'iSearchRank' => 0,
+                           'iNamePhrase' => -1,
+                           'sCountryCode' => false,
+                           'aName' => array(),
+                           'aAddress' => array(),
+                           'aFullNameAddress' => array(),
+                           'aNameNonSearch' => array(),
+                           'aAddressNonSearch' => array(),
+                           'sOperator' => '',
+                           'aFeatureName' => array(),
+                           'sClass' => '',
+                           'sType' => '',
+                           'sHouseNumber' => '',
+                           'fLat' => '',
+                           'fLon' => '',
+                           'fRadius' => ''
+                          )
+                         );
 
             // Do we have a radius search?
             $sNearPointSQL = false;
@@ -940,7 +945,7 @@ class Geocode
                 foreach ($aTokens as $sToken) {
                     // Unknown single word token with a number - assume it is a house number
                     if (!isset($aValidTokens[' '.$sToken]) && strpos($sToken,' ') === false && preg_match('/[0-9]/', $sToken)) {
-                        $aValidTokens[' '.$sToken] = array(array('class'=>'place','type'=>'house'));
+                        $aValidTokens[' '.$sToken] = array(array('class' => 'place', 'type' => 'house'));
                     }
                 }