Passed
Pull Request — master (#143)
by Arman
04:03
created
src/Libraries/Validation/Rules/General.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
         if (!empty($value)) {
83 83
             $captcha = CaptchaManager::getHandler();
84 84
 
85
-            if (!$captcha->verify($value)){
85
+            if (!$captcha->verify($value)) {
86 86
                 $this->addError($field, 'captcha', $param);
87 87
             }
88 88
         }
Please login to merge, or discard this patch.
src/Libraries/Captcha/Adapters/BaseCaptcha.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -124,8 +124,9 @@
 block discarded – undo
124 124
      */
125 125
     public function verify(string $code): bool
126 126
     {
127
-        if (is_null($this->secretKey))
128
-            throw new Exception('The secret key is not set');
127
+        if (is_null($this->secretKey)) {
128
+                    throw new Exception('The secret key is not set');
129
+        }
129 130
 
130 131
         if (empty($code)) {
131 132
             $this->errorCodes = ['internal-empty-response'];
Please login to merge, or discard this patch.