@@ -93,8 +93,7 @@ discard block |
||
93 | 93 | } |
94 | 94 | $decodeSetting = $this->decodeSettings[static::DECODE_ACTION][$action]; |
95 | 95 | $decodeFormat = array_key_exists(static::DECODE_FORMAT, $decodeSetting) ? |
96 | - $decodeSetting[static::DECODE_FORMAT] : |
|
97 | - $this->decodeSettings[static::DECODE_FORMAT]; |
|
96 | + $decodeSetting[static::DECODE_FORMAT] : $this->decodeSettings[static::DECODE_FORMAT]; |
|
98 | 97 | $values = []; |
99 | 98 | switch ($decodeFormat) { |
100 | 99 | case static::RESPONSE_TYPE_STRING: |
@@ -155,7 +154,7 @@ discard block |
||
155 | 154 | */ |
156 | 155 | protected function getActionUrl($action) |
157 | 156 | { |
158 | - return $this->getBaseUrl().$this->actions[$action][static::ACTION_URI]; |
|
157 | + return $this->getBaseUrl() . $this->actions[$action][static::ACTION_URI]; |
|
159 | 158 | } |
160 | 159 | |
161 | 160 | /** |
@@ -199,7 +198,7 @@ discard block |
||
199 | 198 | } |
200 | 199 | switch ($param) { |
201 | 200 | case static::PARAM_SPEC_FILE: |
202 | - return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]); |
|
201 | + return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@' . $this->getFilePath($this->params[$param]); |
|
203 | 202 | case static::PARAM_SPEC_API_KEY: |
204 | 203 | return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param]; |
205 | 204 | case static::PARAM_SPEC_CAPTCHA: |
@@ -309,7 +308,7 @@ discard block |
||
309 | 308 | foreach ($data as $key => $value) { |
310 | 309 | $uri[] = "$key=$value"; |
311 | 310 | } |
312 | - $url .= '?'.implode('&', $uri); |
|
311 | + $url .= '?' . implode('&', $uri); |
|
313 | 312 | } |
314 | 313 | curl_setopt($ch, CURLOPT_URL, $url); |
315 | 314 | if (!$isJson && version_compare(PHP_VERSION, '5.5.0') >= 0 && version_compare(PHP_VERSION, '7.0') < 0 && defined('CURLOPT_SAFE_UPLOAD')) { |
@@ -327,7 +326,7 @@ discard block |
||
327 | 326 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
328 | 327 | 'Content-Type: application/json; charset=utf-8', |
329 | 328 | 'Accept: application/json', |
330 | - 'Content-Length: '.strlen($data), |
|
329 | + 'Content-Length: ' . strlen($data), |
|
331 | 330 | ]); |
332 | 331 | } |
333 | 332 | $result = curl_exec($ch); |