From 25abe1a8d90857a1de39160d18c4e1b93daf95b7 Mon Sep 17 00:00:00 2001 From: Deki Akbar Date: Mon, 22 Mar 2021 15:23:06 +0000 Subject: [PATCH] Apply fixes from StyleCI --- tests/RegionTest.php | 46 ++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/tests/RegionTest.php b/tests/RegionTest.php index fe6d16a..3a3d3ac 100644 --- a/tests/RegionTest.php +++ b/tests/RegionTest.php @@ -22,14 +22,14 @@ protected function tearDown(): void public function testgetAllProvinceBps() { $response = $this->region->getAllProvince('bps'); - if(is_array($response->detail)){ + if (is_array($response->detail)) { foreach ($response->detail as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); break; } } - if(is_array($response->list)){ + if (is_array($response->list)) { foreach ($response->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -41,7 +41,7 @@ public function testgetAllProvinceBps() public function testgetAllProvinceDagri() { $response = $this->region->getAllProvince('dagri'); - if(is_array($response->detail)){ + if (is_array($response->detail)) { foreach ($response->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -50,7 +50,7 @@ public function testgetAllProvinceDagri() break; } } - if(is_array($response->list)){ + if (is_array($response->list)) { foreach ($response->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -62,7 +62,7 @@ public function testgetAllProvinceDagri() public function testgetAllProvincePos() { $response = $this->region->getAllProvince('pos'); - if(is_array($response->detail)){ + if (is_array($response->detail)) { foreach ($response->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -71,7 +71,7 @@ public function testgetAllProvincePos() break; } } - if(is_array($response->list)){ + if (is_array($response->list)) { foreach ($response->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -85,14 +85,14 @@ public function testgetCityListByProvinceIdBps() $provinceIds = [11]; foreach ($provinceIds as $provinceId) { $cities = $this->region->getCityListByProvinceId('bps', $provinceId); - if(is_array($cities->list)){ + if (is_array($cities->list)) { foreach ($cities->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); break; } } - if(is_array($cities->detail)){ + if (is_array($cities->detail)) { foreach ($cities->detail as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -107,7 +107,7 @@ public function testgetCityListByProvinceIdDagri() $provinceIds = [63]; foreach ($provinceIds as $provinceId) { $cities = $this->region->getCityListByProvinceId('dagri', $provinceId); - if(is_array($cities->detail)){ + if (is_array($cities->detail)) { foreach ($cities->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -116,7 +116,7 @@ public function testgetCityListByProvinceIdDagri() break; } } - if(is_array($cities->list)){ + if (is_array($cities->list)) { foreach ($cities->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -131,7 +131,7 @@ public function testgetCityListByProvinceIdPos() $provinceIds = [61]; foreach ($provinceIds as $provinceId) { $cities = $this->region->getCityListByProvinceId('pos', $provinceId); - if(is_array($cities->detail)){ + if (is_array($cities->detail)) { foreach ($cities->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -140,7 +140,7 @@ public function testgetCityListByProvinceIdPos() break; } } - if(is_array($cities->list)){ + if (is_array($cities->list)) { foreach ($cities->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -155,14 +155,14 @@ public function testgetSubdistrictListByCityIdBps() $cityIds = [3278]; foreach ($cityIds as $cityId) { $subdistricts = $this->region->getSubdistrictListByCityId('bps', $cityId); - if(is_array($subdistricts->list)){ + if (is_array($subdistricts->list)) { foreach ($subdistricts->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); break; } } - if(is_array($subdistricts->detail)){ + if (is_array($subdistricts->detail)) { foreach ($subdistricts->detail as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -177,7 +177,7 @@ public function testgetSubdistrictListByCityIdDagri() $cityIds = ['32.78']; foreach ($cityIds as $cityId) { $subdistricts = $this->region->getSubdistrictListByCityId('dagri', $cityId); - if(is_array($subdistricts->detail)){ + if (is_array($subdistricts->detail)) { foreach ($subdistricts->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -186,7 +186,7 @@ public function testgetSubdistrictListByCityIdDagri() break; } } - if(is_array($subdistricts->list)){ + if (is_array($subdistricts->list)) { foreach ($subdistricts->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -201,7 +201,7 @@ public function testgetSubdistrictListByCityIdPos() $cityIds = [3272]; foreach ($cityIds as $cityId) { $subdistricts = $this->region->getSubdistrictListByCityId('pos', $cityId); - if(is_array($subdistricts->detail)){ + if (is_array($subdistricts->detail)) { foreach ($subdistricts->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -210,7 +210,7 @@ public function testgetSubdistrictListByCityIdPos() break; } } - if(is_array($subdistricts->list)){ + if (is_array($subdistricts->list)) { foreach ($subdistricts->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -225,14 +225,14 @@ public function testgetVillageListBySubdistrictIdBps() $subdistricIds = [340302]; foreach ($subdistricIds as $subdistricId) { $villages = $this->region->getVillageListBySubdistrictId('bps', $subdistricId); - if(is_array($villages->detail)){ + if (is_array($villages->detail)) { foreach ($villages->detail as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); break; } } - if(is_array($villages->list)){ + if (is_array($villages->list)) { foreach ($villages->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data); @@ -247,7 +247,7 @@ public function testgetVillageListBySubdistrictIdDagri() $subdistricIds = ['34.03.02']; foreach ($subdistricIds as $subdistricId) { $villages = $this->region->getVillageListBySubdistrictId('dagri', $subdistricId); - if(is_array($villages->detail)){ + if (is_array($villages->detail)) { foreach ($villages->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -264,7 +264,7 @@ public function testgetVillageListBySubdistrictIdPos() $subdistricIds = [327203]; foreach ($subdistricIds as $subdistricId) { $villages = $this->region->getVillageListBySubdistrictId('pos', $subdistricId); - if(is_array($villages->detail)){ + if (is_array($villages->detail)) { foreach ($villages->detail as $data) { $this->assertObjectHasAttribute('kode_bps', $data); $this->assertObjectHasAttribute('nama_bps', $data); @@ -273,7 +273,7 @@ public function testgetVillageListBySubdistrictIdPos() break; } } - if(is_array($villages->list)){ + if (is_array($villages->list)) { foreach ($villages->list as $data) { $this->assertObjectHasAttribute('kode', $data); $this->assertObjectHasAttribute('nama', $data);