Skip to content

Commit e094997

Browse files
PR fixes
1 parent c8a9184 commit e094997

3 files changed

Lines changed: 4 additions & 13 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ $response = $client->getPostcode('5041EB');
4949
$response = $client->getPostcodes('51.566405', '5.077171');
5050
```
5151

52-
Note that to be able to run the example above you should have ran the following command, to have Guzzle6 and the Adapter available.
53-
54-
```bash
55-
composer require php-http/guzzle6-adapter
56-
```
57-
5852
Within a Symfony project
5953
----------------------
6054

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"type": "library",
44
"description": "Client library for the postcodeapi.nu web service.",
55
"keywords": ["postcode","api","client"],
6-
"homepage": "http://www.postcodeapi.nu",
6+
"homepage": "https://www.postcodeapi.nu",
77
"license": "MIT",
88
"authors": [
99
{
@@ -18,7 +18,6 @@
1818
"require": {
1919
"php": "^7.1",
2020
"ext-json": "*",
21-
"php-http/httplug": "^2.0",
2221
"guzzlehttp/psr7": "^1.3",
2322
"psr/http-client": "^1.0"
2423
},

lib/FH/PostcodeAPI/Client.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
use FH\PostcodeAPI\Exception\InvalidApiKeyException;
77
use FH\PostcodeAPI\Exception\ServerErrorException;
88
use GuzzleHttp\Psr7\Request;
9-
use Http\Client\Exception\RequestException;
9+
use Psr\Http\Client\ClientExceptionInterface;
1010
use Psr\Http\Client\ClientInterface;
1111
use Psr\Http\Message\RequestInterface;
1212
use Psr\Http\Message\ResponseInterface;
1313

14-
use function sprintf;
15-
1614
/**
1715
* Client library for postcodeapi.nu 2.0 web service.
1816
*
@@ -105,7 +103,7 @@ public function getPostcodesByCoordinates($latitude, $longitude, $sort = self::P
105103
/**
106104
* @return \stdClass
107105
*
108-
* @throws RequestException
106+
* @throws ClientExceptionInterface
109107
*/
110108
private function get(string $path, array $params = [])
111109
{
@@ -116,7 +114,7 @@ private function get(string $path, array $params = [])
116114
return $this->parseResponse($response, $request);
117115
}
118116

119-
private function buildUrl(?string $path): string
117+
private function buildUrl(string $path): string
120118
{
121119
return sprintf('%s/%s%s', $this->url, $this->version, $path);
122120
}

0 commit comments

Comments
 (0)