From cadbdaff189dc6211aa8bd6060c58a22170b1802 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 18 May 2020 22:20:36 +0200 Subject: [PATCH] fix style --- lib/PlaceLookup.php | 4 ++-- test/php/Nominatim/ClassTypesTest.php | 17 ++++++++--------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/PlaceLookup.php b/lib/PlaceLookup.php index 9cc62f6c..eebfe983 100644 --- a/lib/PlaceLookup.php +++ b/lib/PlaceLookup.php @@ -449,8 +449,8 @@ class PlaceLookup } $aPlace['addresstype'] = ClassTypes\getLabelTag( - $aPlace, - $aPlace['country_code'] + $aPlace, + $aPlace['country_code'] ); } diff --git a/test/php/Nominatim/ClassTypesTest.php b/test/php/Nominatim/ClassTypesTest.php index 814e7cff..324acdde 100644 --- a/test/php/Nominatim/ClassTypesTest.php +++ b/test/php/Nominatim/ClassTypesTest.php @@ -9,41 +9,40 @@ class ClassTypesTest extends \PHPUnit\Framework\TestCase public function testGetLabelTag() { $aPlace = array('class' => 'boundary', 'type' => 'administrative', - 'rank_address' => '4', 'place_type' => 'city'); + 'rank_address' => '4', 'place_type' => 'city'); $this->assertEquals('city', ClassTypes\getLabelTag($aPlace)); $aPlace = array('class' => 'boundary', 'type' => 'administrative', - 'rank_address' => '10'); + 'rank_address' => '10'); $this->assertEquals('state_district', ClassTypes\getLabelTag($aPlace)); $aPlace = array('class' => 'boundary', 'type' => 'administrative'); $this->assertEquals('administrative', ClassTypes\getLabelTag($aPlace)); - $aPlace = array('class' => 'place', 'type' => 'hamlet', - 'rank_address' => '20'); + $aPlace = array('class' => 'place', 'type' => 'hamlet', 'rank_address' => '20'); $this->assertEquals('hamlet', ClassTypes\getLabelTag($aPlace)); $aPlace = array('class' => 'highway', 'type' => 'residential', - 'rank_address' => '26'); + 'rank_address' => '26'); $this->assertEquals('road', ClassTypes\getLabelTag($aPlace)); $aPlace = array('class' => 'place', 'type' => 'house_number', - 'rank_address' => '30'); + 'rank_address' => '30'); $this->assertEquals('house_number', ClassTypes\getLabelTag($aPlace)); $aPlace = array('class' => 'amenity', 'type' => 'prison', - 'rank_address' => '30'); + 'rank_address' => '30'); $this->assertEquals('amenity', ClassTypes\getLabelTag($aPlace)); } public function testGetLabel() { $aPlace = array('class' => 'boundary', 'type' => 'administrative', - 'rank_address' => '4', 'place_type' => 'city'); + 'rank_address' => '4', 'place_type' => 'city'); $this->assertEquals('City', ClassTypes\getLabel($aPlace)); $aPlace = array('class' => 'boundary', 'type' => 'administrative', - 'rank_address' => '10'); + 'rank_address' => '10'); $this->assertEquals('State District', ClassTypes\getLabel($aPlace)); $aPlace = array('class' => 'boundary', 'type' => 'administrative'); -- 2.39.5