1 | <?php |
||
7 | class Instance |
||
8 | { |
||
9 | private $endpoint; |
||
10 | private $client; |
||
11 | |||
12 | 3 | public function __construct($endpoint, Client $client = null) |
|
21 | |||
22 | 2 | public function get($path, $token = null) |
|
23 | { |
||
24 | 2 | return $this->makeRequest('GET', $path, [], $token); |
|
25 | } |
||
26 | |||
27 | 1 | public function formPost($path, $data, $token = null) |
|
28 | { |
||
29 | 1 | return $this->makeRequest('POST', $path, ['form_params' => $data], $token); |
|
30 | } |
||
31 | |||
32 | public function jsonPost($path, $data, $token = null) |
||
36 | |||
37 | 3 | private function makeRequest($method, $path, $extraOptions = [], $token = null) |
|
38 | { |
||
54 | |||
55 | private function processResponse(ResponseInterface $response) |
||
71 | } |
||
72 |
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: