@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | /** |
| 53 | 53 | * Constructor |
| 54 | 54 | * @param string $application_url Contain url of the current application |
| 55 | - * @param Guzzle\Client|null $http_client Client object from Guzzle |
|
| 55 | + * @param null|Client $http_client Client object from Guzzle |
|
| 56 | 56 | */ |
| 57 | 57 | public function __construct( |
| 58 | 58 | $application_url, |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | /** |
| 112 | 112 | * Returns a new search object based on the base search. |
| 113 | 113 | * |
| 114 | - * @return Search |
|
| 114 | + * @return Reverse |
|
| 115 | 115 | */ |
| 116 | 116 | public function newReverse() |
| 117 | 117 | { |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | |
| 147 | 147 | /** |
| 148 | 148 | * Runs the query and returns the result set from Nominatim. |
| 149 | - * @param NominatimInterface $nRequest The object request to send |
|
| 149 | + * @param QueryInterface $nRequest The object request to send |
|
| 150 | 150 | * |
| 151 | 151 | * @return array The decoded data returned from Nominatim |
| 152 | 152 | * @throws \GuzzleHttp\Exception\ClientException if http request is an error |
@@ -171,7 +171,7 @@ discard block |
||
| 171 | 171 | |
| 172 | 172 | /** |
| 173 | 173 | * Return the client using by instance |
| 174 | - * @return GuzzleHttp\Client |
|
| 174 | + * @return Client |
|
| 175 | 175 | */ |
| 176 | 176 | public function getClient() |
| 177 | 177 | { |
@@ -71,21 +71,18 @@ |
||
| 71 | 71 | 'timeout' => 30, |
| 72 | 72 | 'connection_timeout' => 5, |
| 73 | 73 | ]); |
| 74 | - } |
|
| 75 | - else if($http_client instanceof Client) |
|
| 74 | + } else if($http_client instanceof Client) |
|
| 76 | 75 | { |
| 77 | 76 | $application_url_client = $http_client->getConfig('base_uri'); |
| 78 | 77 | |
| 79 | 78 | if(!isset($application_url_client)) |
| 80 | 79 | { |
| 81 | 80 | $http_client->setDefaultOption('base_uri', $application_url); |
| 82 | - } |
|
| 83 | - else if($application_url_client != $application_url) |
|
| 81 | + } else if($application_url_client != $application_url) |
|
| 84 | 82 | { |
| 85 | 83 | throw new InvalidParameterException("http_client parameter has a differente url to application_url parameter"); |
| 86 | 84 | } |
| 87 | - } |
|
| 88 | - else |
|
| 85 | + } else |
|
| 89 | 86 | { |
| 90 | 87 | throw new InvalidParameterException("http_client parameter must be a GuzzleHttp\Client object or empty"); |
| 91 | 88 | } |