Passed
Push — master ( 26f295...e4804f )
by Roberto
02:49
created
src/ReCaptchaServiceProvider.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,10 +32,10 @@  discard block
 block discarded – undo
32 32
     public function boot() {
33 33
 
34 34
         $this->addValidationRule();
35
-        $this->loadRoutesFrom(__DIR__ . '/routes/routes.php');
35
+        $this->loadRoutesFrom(__DIR__.'/routes/routes.php');
36 36
 
37 37
         $this->publishes([
38
-            __DIR__ . '/../config/recaptcha.php' => config_path('recaptcha.php'),
38
+            __DIR__.'/../config/recaptcha.php' => config_path('recaptcha.php'),
39 39
         ]);
40 40
 
41 41
     }
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      */
46 46
     public function addValidationRule() {
47 47
 
48
-        Validator::extendImplicit('recaptcha', function ($attribute, $value, $parameters, $validator) {
48
+        Validator::extendImplicit('recaptcha', function($attribute, $value, $parameters, $validator) {
49 49
 
50 50
             return app('recaptcha')->validate($value);
51 51
         }, trans('validation.recaptcha'));
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     public function register() {
60 60
 
61 61
         $this->mergeConfigFrom(
62
-            __DIR__ . '/../config/recaptcha.php', 'recaptcha'
62
+            __DIR__.'/../config/recaptcha.php', 'recaptcha'
63 63
         );
64 64
 
65 65
         $this->registerReCaptchaBuilder();
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
      */
73 73
     protected function registerReCaptchaBuilder() {
74 74
 
75
-        $this->app->singleton('recaptcha', function ($app) {
75
+        $this->app->singleton('recaptcha', function($app) {
76 76
 
77 77
             $recaptcha_class = '';
78 78
 
Please login to merge, or discard this patch.
src/routes/routes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
8 8
  * MIT license: https://github.com/biscolab/laravel-recaptcha/blob/master/LICENSE
9 9
  */
10 10
 
11
-Route::get(config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate'), function () {
11
+Route::get(config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate'), function() {
12 12
 
13 13
     $token = request()->input(config('recaptcha.default_token_parameter_name', 'token'), '');
14 14
     $validation_response = recaptcha()->validate($token);
Please login to merge, or discard this patch.
src/ReCaptchaBuilder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             }
146 146
             $html .= '<script>
147 147
 		       function biscolabLaravelReCaptcha(token) {
148
-		         document.getElementById("' . $formId . '").submit();
148
+		         document.getElementById("' . $formId.'").submit();
149 149
 		       }
150 150
 		     </script>';
151 151
         }
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             $js_custom_validation = array_get($configuration, 'custom_validation', '');
157 157
 
158 158
             // Check if set custom_validation. That function will override default fetch validation function
159
-            if($js_custom_validation) {
159
+            if ($js_custom_validation) {
160 160
 
161 161
                 $validate_function = ($js_custom_validation) ? "{$js_custom_validation}(token);" : '';
162 162
             }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
                 $js_callback_catch = ($js_callback_catch) ? "{$js_callback_catch}(err)" : '';
170 170
 
171 171
                 $validate_function = "
172
-                fetch('/" . config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate') . "?" . config('recaptcha.default_token_parameter_name', 'token') . "=' + token, {
172
+                fetch('/" . config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate')."?".config('recaptcha.default_token_parameter_name', 'token')."=' + token, {
173 173
                     headers: {
174 174
                         \"X-Requested-With\": \"XMLHttpRequest\",
175 175
                         \"X-CSRF-TOKEN\": csrfToken.content
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
             'response' => $response,
225 225
         ]);
226 226
 
227
-        $url = $this->api_url . '?' . $params;
227
+        $url = $this->api_url.'?'.$params;
228 228
 
229 229
         if (function_exists('curl_version')) {
230 230
             $curl = curl_init($url);
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         }
242 242
         $response = json_decode(trim($curl_response), true);
243 243
 
244
-        if($this->version == 'v3') {
244
+        if ($this->version == 'v3') {
245 245
             return $response;
246 246
         }
247 247
 
Please login to merge, or discard this patch.
src/ReCaptchaBuilderV2.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
      */
34 34
     public function htmlFormSnippet(): string {
35 35
 
36
-        return ($this->version == 'v2') ? '<div class="g-recaptcha" data-sitekey="' . $this->api_site_key . '"></div>' : '';
36
+        return ($this->version == 'v2') ? '<div class="g-recaptcha" data-sitekey="'.$this->api_site_key.'"></div>' : '';
37 37
     }
38 38
 
39 39
 }
40 40
\ No newline at end of file
Please login to merge, or discard this patch.
src/ReCaptchaBuilderInvisible.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
      */
37 37
     public function htmlFormButton($buttonInnerHTML = 'Submit'): string {
38 38
 
39
-        return ($this->version == 'invisible') ? '<button class="g-recaptcha" data-sitekey="' . $this->api_site_key . '" data-callback="biscolabLaravelReCaptcha">' . $buttonInnerHTML . '</button>' : '';
39
+        return ($this->version == 'invisible') ? '<button class="g-recaptcha" data-sitekey="'.$this->api_site_key.'" data-callback="biscolabLaravelReCaptcha">'.$buttonInnerHTML.'</button>' : '';
40 40
     }
41 41
 
42 42
 }
43 43
\ No newline at end of file
Please login to merge, or discard this patch.
tests/ReCaptchaV3Test.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
  */
19 19
 class ReCaptchaV3Test extends TestCase {
20 20
 
21
-    protected $recaptcha_v3        = null;
21
+    protected $recaptcha_v3 = null;
22 22
 
23 23
     /**
24 24
      * @test
Please login to merge, or discard this patch.