diff --git a/src/Provider/IP2Location/IP2Location.php b/src/Provider/IP2Location/IP2Location.php index 111401003..28972ce1c 100644 --- a/src/Provider/IP2Location/IP2Location.php +++ b/src/Provider/IP2Location/IP2Location.php @@ -102,9 +102,8 @@ private function executeQuery(string $url): AddressCollection throw new InvalidCredentials('Insufficient credits to use IP2Location service.'); } elseif (preg_match('/invalid ip address/i', $data['response'])) { throw new UnsupportedOperation('Invalid IP address.'); - } else { - throw new UnsupportedOperation(sprintf('Unexpected error: %s.', $data['response'])); } + throw new UnsupportedOperation(sprintf('Unexpected error: %s.', $data['response'])); } if (isset($data['region_name'])) { diff --git a/src/Provider/MapQuest/MapQuest.php b/src/Provider/MapQuest/MapQuest.php index 4c433467e..d3dae33db 100644 --- a/src/Provider/MapQuest/MapQuest.php +++ b/src/Provider/MapQuest/MapQuest.php @@ -157,11 +157,10 @@ public function geocodeQuery(GeocodeQuery $query): Collection $params = $this->addOptionsForGetQuery($params, $options); return $this->executeGetQuery(static::GEOCODE_ENDPOINT, $params); - } else { - $params = $this->addOptionsForPostQuery($params, $options); - - return $this->executePostQuery(static::GEOCODE_ENDPOINT, $params); } + $params = $this->addOptionsForPostQuery($params, $options); + + return $this->executePostQuery(static::GEOCODE_ENDPOINT, $params); } public function reverseQuery(ReverseQuery $query): Collection