Completed
Pull Request — master (#8)
by Dmitrii
04:27 queued 01:56
created
src/core/DeCaptchaAbstract.php 1 patch
Spacing   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
         }
104 104
         $decodeSetting = $this->decodeSettings[static::DECODE_ACTION][$action];
105 105
         $decodeFormat = array_key_exists(static::DECODE_FORMAT, $decodeSetting) ?
106
-            $decodeSetting[static::DECODE_FORMAT] :
107
-            $this->decodeSettings[static::DECODE_FORMAT];
106
+            $decodeSetting[static::DECODE_FORMAT] : $this->decodeSettings[static::DECODE_FORMAT];
108 107
         $values = [];
109 108
         switch ($decodeFormat) {
110 109
             case static::RESPONSE_TYPE_STRING:
@@ -181,7 +180,7 @@  discard block
 block discarded – undo
181 180
      */
182 181
     protected function getActionUrl($action)
183 182
     {
184
-        return $this->getBaseUrl().$this->actions[$action][static::ACTION_URI];
183
+        return $this->getBaseUrl() . $this->actions[$action][static::ACTION_URI];
185 184
     }
186 185
 
187 186
     /**
@@ -238,7 +237,7 @@  discard block
 block discarded – undo
238 237
                         return base64_encode(file_get_contents($this->params[$param]));
239 238
                 }
240 239
 
241
-                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]);
240
+                return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@' . $this->getFilePath($this->params[$param]);
242 241
             case static::PARAM_SPEC_API_KEY:
243 242
                 return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param];
244 243
             case static::PARAM_SPEC_CAPTCHA:
@@ -301,7 +300,7 @@  discard block
 block discarded – undo
301 300
                         break;
302 301
                 }
303 302
                 if (array_key_exists(self::PARAM_SLUG_ENUM, $settings) && !in_array($value, $settings[static::PARAM_SLUG_ENUM])) {
304
-                    throw new DeCaptchaErrors(DeCaptchaErrors::ERROR_PARAM_ENUM, (array_key_exists($field, $this->paramsNames) ? $this->paramsNames[$field] : $field).' = '.$value, $this->errorLang);
303
+                    throw new DeCaptchaErrors(DeCaptchaErrors::ERROR_PARAM_ENUM, (array_key_exists($field, $this->paramsNames) ? $this->paramsNames[$field] : $field) . ' = ' . $value, $this->errorLang);
305 304
                 }
306 305
                 $params[$this->paramsNames[$field]] = $value;
307 306
             }
Please login to merge, or discard this patch.