@@ -99,8 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | $decodeSetting = $this->decodeSettings[static::DECODE_ACTION][$action]; |
101 | 101 | $decodeFormat = array_key_exists(static::DECODE_FORMAT, $decodeSetting) ? |
102 | - $decodeSetting[static::DECODE_FORMAT] : |
|
103 | - $this->decodeSettings[static::DECODE_FORMAT]; |
|
102 | + $decodeSetting[static::DECODE_FORMAT] : $this->decodeSettings[static::DECODE_FORMAT]; |
|
104 | 103 | $values = []; |
105 | 104 | switch ($decodeFormat) { |
106 | 105 | case static::RESPONSE_TYPE_STRING: |
@@ -177,7 +176,7 @@ discard block |
||
177 | 176 | */ |
178 | 177 | protected function getActionUrl($action) |
179 | 178 | { |
180 | - return $this->getBaseUrl().$this->actions[$action][static::ACTION_URI]; |
|
179 | + return $this->getBaseUrl() . $this->actions[$action][static::ACTION_URI]; |
|
181 | 180 | } |
182 | 181 | |
183 | 182 | /** |
@@ -227,7 +226,7 @@ discard block |
||
227 | 226 | return base64_encode(file_get_contents($this->params[$param])); |
228 | 227 | } |
229 | 228 | |
230 | - return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]); |
|
229 | + return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@' . $this->getFilePath($this->params[$param]); |
|
231 | 230 | case static::PARAM_SPEC_API_KEY: |
232 | 231 | return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param]; |
233 | 232 | case static::PARAM_SPEC_CAPTCHA: |
@@ -284,7 +283,7 @@ discard block |
||
284 | 283 | $params[$this->paramsNames[$field]] = (string) $value; |
285 | 284 | break; |
286 | 285 | case self::PARAM_FIELD_TYPE_BOOLEAN: |
287 | - $params[$this->paramsNames[$field]] = (bool)$value; |
|
286 | + $params[$this->paramsNames[$field]] = (bool) $value; |
|
288 | 287 | break; |
289 | 288 | case self::PARAM_FIELD_TYPE_MIX: |
290 | 289 | $params[$this->paramsNames[$field]] = $value; |
@@ -354,7 +353,7 @@ discard block |
||
354 | 353 | foreach ($data as $key => $value) { |
355 | 354 | $uri[] = "$key=$value"; |
356 | 355 | } |
357 | - $url .= '?'.implode('&', $uri); |
|
356 | + $url .= '?' . implode('&', $uri); |
|
358 | 357 | } |
359 | 358 | curl_setopt($ch, CURLOPT_URL, $url); |
360 | 359 | if (!$isJson && version_compare(PHP_VERSION, '5.5.0') >= 0 && version_compare(PHP_VERSION, '7.0') < 0 && defined('CURLOPT_SAFE_UPLOAD')) { |
@@ -372,7 +371,7 @@ discard block |
||
372 | 371 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
373 | 372 | 'Content-Type: application/json; charset=utf-8', |
374 | 373 | 'Accept: application/json', |
375 | - 'Content-Length: '.strlen($data), |
|
374 | + 'Content-Length: ' . strlen($data), |
|
376 | 375 | ]); |
377 | 376 | } |
378 | 377 | $result = curl_exec($ch); |