| 1 | <?php |
||
| 10 | class GuzzleHttpAdater implements HttpInterface |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var Client |
||
| 14 | */ |
||
| 15 | protected $client; |
||
| 16 | |||
| 17 | public function __construct($baseUrl) |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param string $uri |
||
| 24 | * @param array $params |
||
| 25 | * @param null $headers |
||
| 26 | * @return array|null |
||
| 27 | */ |
||
| 28 | public function get($uri, $params = [], $headers = null) |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @param string $uri |
||
| 45 | * @param array $params |
||
| 46 | * @param null $headers |
||
| 47 | * @return array|null |
||
| 48 | */ |
||
| 49 | public function post($uri, $params = [], $headers = null) |
||
| 59 | |||
| 60 | /** |
||
| 61 | * @param Response $response |
||
| 62 | * @return array|null |
||
| 63 | */ |
||
| 64 | private function parseResponse(Response $response) |
||
| 68 | |||
| 69 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: