@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | /** |
38 | - * @param null $url |
|
38 | + * @param string $url |
|
39 | 39 | * @param array $options |
40 | 40 | * @throws \Exception |
41 | - * @return \GuzzleHttp\Message\FutureResponse|\GuzzleHttp\Message\ResponseInterface|\GuzzleHttp\Ring\Future\FutureInterface|null |
|
41 | + * @return Client |
|
42 | 42 | */ |
43 | 43 | public function post($url = null, array $options = []) |
44 | 44 | { |
@@ -59,9 +59,9 @@ discard block |
||
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
62 | - * @param null $url |
|
62 | + * @param string $url |
|
63 | 63 | * @param array $options |
64 | - * @return \GuzzleHttp\Message\FutureResponse|\GuzzleHttp\Message\ResponseInterface|\GuzzleHttp\Ring\Future\FutureInterface|null |
|
64 | + * @return \GuzzleHttp\Message\ResponseInterface|null |
|
65 | 65 | */ |
66 | 66 | public function get($url = null, $options = []) |
67 | 67 | { |
@@ -49,12 +49,12 @@ discard block |
||
49 | 49 | $message = $error['message']['message']; |
50 | 50 | if (isset($error['message']['cause'])) { |
51 | 51 | if (is_array($error['message']['cause'])) { |
52 | - $message .= ' '. implode(', ', $error['message']['cause']); |
|
52 | + $message .= ' '.implode(', ', $error['message']['cause']); |
|
53 | 53 | } else { |
54 | - $message .= ' '. $error['message']['cause']; |
|
54 | + $message .= ' '.$error['message']['cause']; |
|
55 | 55 | } |
56 | 56 | } |
57 | - throw new \Exception('Error while calling post on '. $url .': '. $message); |
|
57 | + throw new \Exception('Error while calling post on '.$url.': '.$message); |
|
58 | 58 | } |
59 | 59 | } |
60 | 60 | |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | */ |
92 | 92 | public function getOrganization($id): Organization |
93 | 93 | { |
94 | - $response = $this->get('organizations/'. $id); |
|
94 | + $response = $this->get('organizations/'.$id); |
|
95 | 95 | return Organization::fromJson($response->json(['object' => true]), $this); |
96 | 96 | } |
97 | 97 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | */ |
184 | 184 | public function getWorker($id, $filter = null, $analytics = false): Worker |
185 | 185 | { |
186 | - $response = $this->get('workers/'. $id, [ |
|
186 | + $response = $this->get('workers/'.$id, [ |
|
187 | 187 | 'query' => [ |
188 | 188 | 'filter' => $filter, |
189 | 189 | 'analytics' => $analytics ? 'true' : 'false', |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | */ |
246 | 246 | public function getTeam($id): Team |
247 | 247 | { |
248 | - $response = $this->get('teams/'. $id); |
|
248 | + $response = $this->get('teams/'.$id); |
|
249 | 249 | return Team::fromJson($response->json(['object' => true]), $this); |
250 | 250 | } |
251 | 251 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | */ |
288 | 288 | public function getDestination($id): Destination |
289 | 289 | { |
290 | - $response = $this->get('destinations/'. $id); |
|
290 | + $response = $this->get('destinations/'.$id); |
|
291 | 291 | return Destination::fromJson($response->json(['object' => true]), $this); |
292 | 292 | } |
293 | 293 | |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | */ |
319 | 319 | public function getRecipient($id): Recipient |
320 | 320 | { |
321 | - $response = $this->get('recipients/'. $id); |
|
321 | + $response = $this->get('recipients/'.$id); |
|
322 | 322 | return Recipient::fromJson($response->json(['object' => true]), $this); |
323 | 323 | } |
324 | 324 | |
@@ -329,7 +329,7 @@ discard block |
||
329 | 329 | public function getRecipientByName($name) |
330 | 330 | { |
331 | 331 | $name = str_replace('+', '%20', urlencode(strtolower($name))); |
332 | - $response = $this->get('recipients/name/'. $name); |
|
332 | + $response = $this->get('recipients/name/'.$name); |
|
333 | 333 | |
334 | 334 | if (null === $response) { |
335 | 335 | return null; |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | */ |
345 | 345 | public function getRecipientByPhone($phone) |
346 | 346 | { |
347 | - $response = $this->get('recipients/phone/'. $phone); |
|
347 | + $response = $this->get('recipients/phone/'.$phone); |
|
348 | 348 | |
349 | 349 | if (null === $response) { |
350 | 350 | return null; |
@@ -405,7 +405,7 @@ discard block |
||
405 | 405 | */ |
406 | 406 | public function getTask($id): Task |
407 | 407 | { |
408 | - $response = $this->get('tasks/'. $id); |
|
408 | + $response = $this->get('tasks/'.$id); |
|
409 | 409 | return Task::fromJson($response->json(['object' => true]), $this); |
410 | 410 | } |
411 | 411 | |
@@ -415,7 +415,7 @@ discard block |
||
415 | 415 | */ |
416 | 416 | public function getTaskByShortId($shortId): Task |
417 | 417 | { |
418 | - $response = $this->get('tasks/shortId/'. $shortId); |
|
418 | + $response = $this->get('tasks/shortId/'.$shortId); |
|
419 | 419 | return Task::fromJson($response->json(['object' => true]), $this); |
420 | 420 | } |
421 | 421 | |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | array_unshift($taskIds, $position); |
528 | 528 | } |
529 | 529 | |
530 | - $this->put('containers/'. $containerEndpoint .'/'. $targetId, [ |
|
530 | + $this->put('containers/'.$containerEndpoint.'/'.$targetId, [ |
|
531 | 531 | 'json' => [ |
532 | 532 | 'tasks' => $taskIds |
533 | 533 | ] |
@@ -141,7 +141,7 @@ discard block |
||
141 | 141 | } |
142 | 142 | |
143 | 143 | /** |
144 | - * @param mixed $merchant |
|
144 | + * @param string|null $merchant |
|
145 | 145 | */ |
146 | 146 | public function setMerchant($merchant) |
147 | 147 | { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | } |
158 | 158 | |
159 | 159 | /** |
160 | - * @param mixed $executor |
|
160 | + * @param string|null $executor |
|
161 | 161 | */ |
162 | 162 | public function setExecutor($executor) |
163 | 163 | { |
@@ -365,7 +365,7 @@ discard block |
||
365 | 365 | } |
366 | 366 | |
367 | 367 | /** |
368 | - * @param mixed $destination |
|
368 | + * @param string|null $destination |
|
369 | 369 | */ |
370 | 370 | public function setDestination($destination) |
371 | 371 | { |