Completed
Pull Request — master (#303)
by
unknown
13s
created
src/Captcha.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -352,7 +352,9 @@  discard block
 block discarded – undo
352 352
         }
353 353
 
354 354
         $hash = $this->hasher->make($key);
355
-        if ($this->encrypt) $hash = Crypt::encrypt($hash);
355
+        if ($this->encrypt) {
356
+            $hash = Crypt::encrypt($hash);
357
+        }
356 358
 
357 359
         $this->session->put('captcha', [
358 360
             'sensitive' => $this->sensitive,
@@ -489,7 +491,9 @@  discard block
 block discarded – undo
489 491
             $value = $this->str->lower($value);
490 492
         }
491 493
 
492
-        if ($encrypt) $key = Crypt::decrypt($key);
494
+        if ($encrypt) {
495
+            $key = Crypt::decrypt($key);
496
+        }
493 497
         $check = $this->hasher->check($value, $key);
494 498
         // if verify pass,remove session
495 499
         if ($check) {
@@ -526,8 +530,12 @@  discard block
 block discarded – undo
526 530
 
527 531
         $this->configure($config);
528 532
 
529
-        if (!$this->sensitive) $value = $this->str->lower($value);
530
-        if ($this->encrypt) $key = Crypt::decrypt($key);
533
+        if (!$this->sensitive) {
534
+            $value = $this->str->lower($value);
535
+        }
536
+        if ($this->encrypt) {
537
+            $key = Crypt::decrypt($key);
538
+        }
531 539
         return $this->hasher->check($value, $key);
532 540
     }
533 541
 
Please login to merge, or discard this patch.