@@ -13,6 +13,9 @@ discard block |
||
| 13 | 13 | |
| 14 | 14 | class Curl |
| 15 | 15 | { |
| 16 | + /** |
|
| 17 | + * @param string $host |
|
| 18 | + */ |
|
| 16 | 19 | public static function getResponse($host, $url, $method, $token, array $params) |
| 17 | 20 | { |
| 18 | 21 | $curl = curl_init(); |
@@ -76,6 +79,9 @@ discard block |
||
| 76 | 79 | return $response; |
| 77 | 80 | } |
| 78 | 81 | |
| 82 | + /** |
|
| 83 | + * @param string $message |
|
| 84 | + */ |
|
| 79 | 85 | private static function getError($message, $code) |
| 80 | 86 | { |
| 81 | 87 | return [ |
@@ -82,7 +82,7 @@ |
||
| 82 | 82 | ]; |
| 83 | 83 | |
| 84 | 84 | if ($this->fields) { |
| 85 | - $params['fields'] = implode(',', (array) $this->fields); |
|
| 85 | + $params['fields'] = implode(',', (array)$this->fields); |
|
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | $response = $this->client->getResponse($this->getUrl(__FUNCTION__), $params); |