Completed
Push — master ( 316ab6...ce7de3 )
by Владислав
02:26
created
src/core/DeCaptchaAbstract.php 1 patch
Spacing   +8 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,8 +101,7 @@  discard block
 block discarded – undo
101 101
         }
102 102
         $decodeSetting = $this->decodeSettings[static::DECODE_ACTION][$action];
103 103
         $decodeFormat = array_key_exists(static::DECODE_FORMAT, $decodeSetting) ?
104
-            $decodeSetting[static::DECODE_FORMAT] :
105
-            $this->decodeSettings[static::DECODE_FORMAT];
104
+            $decodeSetting[static::DECODE_FORMAT] : $this->decodeSettings[static::DECODE_FORMAT];
106 105
         $values = [];
107 106
         switch ($decodeFormat) {
108 107
             case static::RESPONSE_TYPE_STRING:
@@ -179,7 +178,7 @@  discard block
 block discarded – undo
179 178
      */
180 179
     protected function getActionUrl($action)
181 180
     {
182
-        return $this->getBaseUrl().$this->actions[$action][static::ACTION_URI];
181
+        return $this->getBaseUrl() . $this->actions[$action][static::ACTION_URI];
183 182
     }
184 183
 
185 184
     /**
@@ -229,7 +228,7 @@  discard block
 block discarded – undo
229 228
                         return base64_encode(file_get_contents($this->params[$param]));
230 229
                 }
231 230
 
232
-                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]);
231
+                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@' . $this->getFilePath($this->params[$param]);
233 232
             case static::PARAM_SPEC_API_KEY:
234 233
                 return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param];
235 234
             case static::PARAM_SPEC_CAPTCHA:
@@ -280,13 +279,13 @@  discard block
 block discarded – undo
280 279
             if (array_key_exists($field, $this->paramsNames)) {
281 280
                 switch ($settings[self::PARAM_SLUG_TYPE]) {
282 281
                     case self::PARAM_FIELD_TYPE_INTEGER:
283
-                        $value = (int)$value;
282
+                        $value = (int) $value;
284 283
                         break;
285 284
                     case self::PARAM_FIELD_TYPE_STRING:
286
-                        $value = (string)$value;
285
+                        $value = (string) $value;
287 286
                         break;
288 287
                     case self::PARAM_FIELD_TYPE_BOOLEAN:
289
-                        $value = (bool)$value;
288
+                        $value = (bool) $value;
290 289
                         break;
291 290
                     case self::PARAM_FIELD_TYPE_MIX:
292 291
 //                        $value = $value;
@@ -360,7 +359,7 @@  discard block
 block discarded – undo
360 359
             foreach ($data as $key => $value) {
361 360
                 $uri[] = "$key=$value";
362 361
             }
363
-            $url .= '?'.implode('&', $uri);
362
+            $url .= '?' . implode('&', $uri);
364 363
         }
365 364
         curl_setopt($ch, CURLOPT_URL, $url);
366 365
         if (!$isJson && version_compare(PHP_VERSION, '5.5.0') >= 0 && version_compare(PHP_VERSION, '7.0') < 0 && defined('CURLOPT_SAFE_UPLOAD')) {
@@ -378,7 +377,7 @@  discard block
 block discarded – undo
378 377
             curl_setopt($ch, CURLOPT_HTTPHEADER, [
379 378
                 'Content-Type: application/json; charset=utf-8',
380 379
                 'Accept: application/json',
381
-                'Content-Length: '.strlen($data),
380
+                'Content-Length: ' . strlen($data),
382 381
             ]);
383 382
         }
384 383
         $result = curl_exec($ch);
Please login to merge, or discard this patch.