Completed
Pull Request — master (#310)
by zi
13s
created
src/Captcha.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -341,7 +341,9 @@  discard block
 block discarded – undo
341 341
         }
342 342
 
343 343
         $hash = $this->hasher->make($key);
344
-        if($this->encrypt) $hash = Crypt::encrypt($hash);
344
+        if($this->encrypt) {
345
+            $hash = Crypt::encrypt($hash);
346
+        }
345 347
         
346 348
         $this->session->put('captcha', [
347 349
             'sensitive' => $this->sensitive,
@@ -474,7 +476,9 @@  discard block
 block discarded – undo
474 476
             $value = $this->str->lower($value);
475 477
         }
476 478
 
477
-        if($encrypt) $key = Crypt::decrypt($key);
479
+        if($encrypt) {
480
+            $key = Crypt::decrypt($key);
481
+        }
478 482
         $check = $this->hasher->check($value, $key);
479 483
         // if verify pass,remove session
480 484
         if ($check) {
@@ -500,8 +504,12 @@  discard block
 block discarded – undo
500 504
 
501 505
         $this->configure($config);
502 506
 
503
-        if(!$this->sensitive) $value = $this->str->lower($value);
504
-        if($this->encrypt) $key = Crypt::decrypt($key);
507
+        if(!$this->sensitive) {
508
+            $value = $this->str->lower($value);
509
+        }
510
+        if($this->encrypt) {
511
+            $key = Crypt::decrypt($key);
512
+        }
505 513
         return $this->hasher->check($value, $key);
506 514
     }
507 515
 
Please login to merge, or discard this patch.
src/CaptchaServiceProvider.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@
 block discarded – undo
74 74
             'captcha'
75 75
         );
76 76
 
77
-         // Bind the ImageManager with an explicit driver
78
-         if (!$this->app->bound('Intervention\Image\ImageManager')) {
77
+            // Bind the ImageManager with an explicit driver
78
+            if (!$this->app->bound('Intervention\Image\ImageManager')) {
79 79
             $this->app->singleton('Intervention\Image\ImageManager', function ($app) {
80 80
                 // Determine which driver to use, defaulting to 'gd'
81 81
                 $driver = config('captcha.driver', 'gd') === 'imagick' ? new ImagickDriver() : new GdDriver();
Please login to merge, or discard this patch.