Passed
Pull Request — master (#11)
by Roberto
05:19
created
src/ReCaptchaServiceProvider.php 1 patch
Braces   +5 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,8 +47,11 @@
 block discarded – undo
47 47
     protected function registerReCaptchaBuilder()
48 48
     {
49 49
         $this->app->singleton('recaptcha', function ($app) {
50
-            if(config('recaptcha.version') == 'v2') return new ReCaptchaBuilderV2(config('recaptcha.api_site_key'), config('recaptcha.api_secret_key'), config('recaptcha.version'));
51
-            else return new ReCaptchaBuilderInvisible(config('recaptcha.api_site_key'), config('recaptcha.api_secret_key'), config('recaptcha.version'));
50
+            if(config('recaptcha.version') == 'v2') {
51
+                return new ReCaptchaBuilderV2(config('recaptcha.api_site_key'), config('recaptcha.api_secret_key'), config('recaptcha.version'));
52
+            } else {
53
+                return new ReCaptchaBuilderInvisible(config('recaptcha.api_site_key'), config('recaptcha.api_secret_key'), config('recaptcha.version'));
54
+            }
52 55
         });
53 56
     }
54 57
 
Please login to merge, or discard this patch.
src/ReCaptchaBuilder.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,10 +63,14 @@
 block discarded – undo
63 63
 	 */
64 64
 	public function htmlScriptTagJsApi($formId = '')
65 65
 	{
66
-		if($this->skip_by_ip) return '';
66
+		if($this->skip_by_ip) {
67
+		    return '';
68
+		}
67 69
 		$html = "<script src='https://www.google.com/recaptcha/api.js' async defer></script>";
68 70
 		if($this->version != 'v2'){
69
-			if(!$formId) throw new Exception("formId required", 1);
71
+			if(!$formId) {
72
+			    throw new Exception("formId required", 1);
73
+			}
70 74
 			$html.= '<script>
71 75
 		       function biscolabLaravelReCaptcha(token) {
72 76
 		         document.getElementById("'.$formId.'").submit();
Please login to merge, or discard this patch.