From 300ac4b77b8d78d1003dc4d02e2dbd88c5274200 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Fri, 3 Apr 2020 20:07:50 +0200 Subject: [PATCH] fix phpcs issues --- lib/AddressDetails.php | 16 ++++++++-------- lib/template/address-geocodejson.php | 2 +- lib/template/search-geocodejson.php | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/AddressDetails.php b/lib/AddressDetails.php index 2aae0742..8d2b3e08 100644 --- a/lib/AddressDetails.php +++ b/lib/AddressDetails.php @@ -128,21 +128,21 @@ class AddressDetails if ($aLine['type'] == 'postcode' || $aLine['type'] == 'postal_code') { $aJson['postcode'] = $aLine['localname']; - } else if ($aLine['type'] == 'house_number') { + } elseif ($aLine['type'] == 'house_number') { $aJson['housenumber'] = $aLine['localname']; - } else if ($iRank > 25 && $iRank < 28) { + } elseif ($iRank > 25 && $iRank < 28) { $aJson['street'] = $aLine['localname']; - } else if ($iRank >= 22 && $iRank <= 25) { + } elseif ($iRank >= 22 && $iRank <= 25) { $aJson['locality'] = $aLine['localname']; - } else if ($iRank >= 17 && $iRank <= 21) { + } elseif ($iRank >= 17 && $iRank <= 21) { $aJson['district'] = $aLine['localname']; - } else if ($iRank >= 13 && $iRank <= 16) { + } elseif ($iRank >= 13 && $iRank <= 16) { $aJson['city'] = $aLine['localname']; - } else if ($iRank >= 10 && $iRank <= 12) { + } elseif ($iRank >= 10 && $iRank <= 12) { $aJson['county'] = $aLine['localname']; - } else if ($iRank >= 5 && $iRank <= 9) { + } elseif ($iRank >= 5 && $iRank <= 9) { $aJson['state'] = $aLine['localname']; - } else if ($iRank == 4) { + } elseif ($iRank == 4) { $aJson['country'] = $aLine['localname']; } } diff --git a/lib/template/address-geocodejson.php b/lib/template/address-geocodejson.php index 6ccbeb57..98c368b3 100644 --- a/lib/template/address-geocodejson.php +++ b/lib/template/address-geocodejson.php @@ -34,7 +34,7 @@ if (empty($aPlace)) { if (isset($aPlace['address'])) { $aPlace['address']->addGeocodeJsonAddressParts( - $aFilteredPlaces['properties']['geocoding'] + $aFilteredPlaces['properties']['geocoding'] ); $aFilteredPlaces['properties']['geocoding']['admin'] diff --git a/lib/template/search-geocodejson.php b/lib/template/search-geocodejson.php index c046b4af..dfb402bd 100644 --- a/lib/template/search-geocodejson.php +++ b/lib/template/search-geocodejson.php @@ -24,7 +24,7 @@ foreach ($aSearchResults as $iResNum => $aPointDetails) { if (isset($aPointDetails['address'])) { $aPointDetails['address']->addGeocodeJsonAddressParts( - $aPlace['properties']['geocoding'] + $aPlace['properties']['geocoding'] ); $aPlace['properties']['geocoding']['admin'] -- 2.39.5