1 | <?php |
||
27 | class HttpClient implements HttpClientInterface |
||
28 | { |
||
29 | /** |
||
30 | * @var Client |
||
31 | */ |
||
32 | private $guzzleClient; |
||
33 | |||
34 | /** |
||
35 | * Panda cloud id |
||
36 | * |
||
37 | * @var string |
||
38 | */ |
||
39 | private $cloudId; |
||
40 | |||
41 | /** |
||
42 | * Panda Account |
||
43 | * |
||
44 | * @var Account |
||
45 | */ |
||
46 | private $account; |
||
47 | |||
48 | /** |
||
49 | * {@inheritDoc} |
||
50 | */ |
||
51 | 10 | public function setCloudId($cloudId) |
|
55 | |||
56 | /** |
||
57 | * {@inheritDoc} |
||
58 | */ |
||
59 | 1 | public function getCloudId() |
|
63 | |||
64 | /** |
||
65 | * {@inheritDoc} |
||
66 | */ |
||
67 | 10 | public function setAccount(Account $account) |
|
71 | |||
72 | /** |
||
73 | * {@inheritDoc} |
||
74 | */ |
||
75 | 1 | public function getAccount() |
|
79 | |||
80 | 10 | public function setGuzzleClient(Client $guzzleClient) |
|
84 | |||
85 | public function getGuzzleClient() |
||
89 | |||
90 | /** |
||
91 | * {@inheritDoc} |
||
92 | */ |
||
93 | 2 | public function get($path, array $params = array()) |
|
97 | |||
98 | /** |
||
99 | * {@inheritDoc} |
||
100 | */ |
||
101 | 1 | public function post($path, array $params = array()) |
|
105 | |||
106 | /** |
||
107 | * {@inheritDoc} |
||
108 | */ |
||
109 | 1 | public function put($path, array $params = array()) |
|
113 | |||
114 | /** |
||
115 | * {@inheritDoc} |
||
116 | */ |
||
117 | 1 | public function delete($path, array $params = array()) |
|
121 | |||
122 | /** |
||
123 | * Send signed HTTP requests to the API server. |
||
124 | * |
||
125 | * @param string $method HTTP method (GET, POST, PUT or DELETE) |
||
126 | * @param string $path Request path |
||
127 | * @param array $params Additional request parameters |
||
128 | * |
||
129 | * @return string The API server's response |
||
130 | * |
||
131 | * @throws ApiException if an API error occurs |
||
132 | * @throws HttpException if the request fails |
||
133 | */ |
||
134 | 5 | private function request($method, $path, array $params) |
|
186 | } |
||
187 |
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: