Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/Provider/IP2Location/IP2Location.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down
7 changes: 3 additions & 4 deletions src/Provider/MapQuest/MapQuest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down