]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib-php/AddressDetails.php
split up large setup function
[nominatim.git] / lib-php / AddressDetails.php
index bf8defc230a9c66b0a1f52ec2049e7522a7b7491..91e3d89fcfac21acf1120aea9aa58d2cf3d1d4a7 100644 (file)
@@ -61,7 +61,7 @@ class AddressDetails
         return join(', ', $aParts);
     }
 
-    public function getAddressNames($sCountry = null)
+    public function getAddressNames()
     {
         $aAddress = array();
 
@@ -79,12 +79,11 @@ class AddressDetails
                 $sName = $aLine['housenumber'];
             }
 
-            if (isset($sName)) {
-                if (!isset($aAddress[$sTypeLabel])
-                    || $aLine['class'] == 'place'
-                ) {
-                    $aAddress[$sTypeLabel] = $sName;
-                }
+            if (isset($sName)
+                && (!isset($aAddress[$sTypeLabel])
+                    || $aLine['class'] == 'place')
+            ) {
+                $aAddress[$sTypeLabel] = $sName;
             }
         }