@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $whitelist = explode(',', $whitelist); |
178 | 178 | } |
179 | 179 | |
180 | - $whitelist = array_map(function ($item) { |
|
180 | + $whitelist = array_map(function($item) { |
|
181 | 181 | |
182 | 182 | return trim($item); |
183 | 183 | }, $whitelist); |
@@ -231,8 +231,8 @@ discard block |
||
231 | 231 | } |
232 | 232 | |
233 | 233 | // Create query string |
234 | - $query = ($query) ? '?' . http_build_query($query) : ""; |
|
235 | - $html .= "<script src=\"https://www.google.com/recaptcha/api.js" . $query . "\" async defer></script>"; |
|
234 | + $query = ($query) ? '?'.http_build_query($query) : ""; |
|
235 | + $html .= "<script src=\"https://www.google.com/recaptcha/api.js".$query."\" async defer></script>"; |
|
236 | 236 | |
237 | 237 | return $html; |
238 | 238 | } |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | 'response' => $response, |
267 | 267 | ]); |
268 | 268 | |
269 | - $url = $this->api_url . '?' . $params; |
|
269 | + $url = $this->api_url.'?'.$params; |
|
270 | 270 | |
271 | 271 | if (function_exists('curl_version')) { |
272 | 272 |
@@ -45,11 +45,11 @@ discard block |
||
45 | 45 | |
46 | 46 | foreach ($config_data_attributes as $k => $v) { |
47 | 47 | if ($v) { |
48 | - $data_attributes[] = 'data-' . $k . '="' . $v . '"'; |
|
48 | + $data_attributes[] = 'data-'.$k.'="'.$v.'"'; |
|
49 | 49 | } |
50 | 50 | } |
51 | 51 | |
52 | - $html = '<div class="g-recaptcha" ' . implode(" ", $data_attributes) . ' id="recaptcha-element"></div>'; |
|
52 | + $html = '<div class="g-recaptcha" '.implode(" ", $data_attributes).' id="recaptcha-element"></div>'; |
|
53 | 53 | |
54 | 54 | return $html; |
55 | 55 | } |
@@ -68,15 +68,15 @@ discard block |
||
68 | 68 | $tag_attributes = array_merge($tag_attributes, config('recaptcha.tag_attributes', [])); |
69 | 69 | |
70 | 70 | if (Arr::get($tag_attributes, 'callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
71 | - throw new InvalidConfigurationException('Property "callback" ("data-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
71 | + throw new InvalidConfigurationException('Property "callback" ("data-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | if (Arr::get($tag_attributes, 'expired-callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
75 | - throw new InvalidConfigurationException('Property "expired-callback" ("data-expired-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
75 | + throw new InvalidConfigurationException('Property "expired-callback" ("data-expired-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | if (Arr::get($tag_attributes, 'error-callback') === ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION) { |
79 | - throw new InvalidConfigurationException('Property "error-callback" ("data-error-callback") must be different from "' . ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION . '"'); |
|
79 | + throw new InvalidConfigurationException('Property "error-callback" ("data-error-callback") must be different from "'.ReCaptchaBuilder::DEFAULT_ONLOAD_JS_FUNCTION.'"'); |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return $tag_attributes; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | $attributes = $this->getTagAttributes(); |
92 | 92 | |
93 | - return "<script>var biscolabOnloadCallback = function() {grecaptcha.render('recaptcha-element', " . json_encode($attributes) . ");};</script>"; |
|
93 | + return "<script>var biscolabOnloadCallback = function() {grecaptcha.render('recaptcha-element', ".json_encode($attributes).");};</script>"; |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | } |
97 | 97 | \ No newline at end of file |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $this->addValidationRule(); |
38 | 38 | $this->registerRoutes(); |
39 | 39 | $this->publishes([ |
40 | - __DIR__ . '/../config/recaptcha.php' => config_path('recaptcha.php'), |
|
40 | + __DIR__.'/../config/recaptcha.php' => config_path('recaptcha.php'), |
|
41 | 41 | ], 'config'); |
42 | 42 | |
43 | 43 | } |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | public function addValidationRule() |
49 | 49 | { |
50 | 50 | |
51 | - Validator::extendImplicit(recaptchaRuleName(), function ($attribute, $value) { |
|
51 | + Validator::extendImplicit(recaptchaRuleName(), function($attribute, $value) { |
|
52 | 52 | |
53 | 53 | return app('recaptcha')->validate($value); |
54 | 54 | }, trans('validation.recaptcha')); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | { |
64 | 64 | |
65 | 65 | $this->mergeConfigFrom( |
66 | - __DIR__ . '/../config/recaptcha.php', 'recaptcha' |
|
66 | + __DIR__.'/../config/recaptcha.php', 'recaptcha' |
|
67 | 67 | ); |
68 | 68 | |
69 | 69 | $this->registerReCaptchaBuilder(); |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | protected function registerReCaptchaBuilder() |
105 | 105 | { |
106 | 106 | |
107 | - $this->app->singleton('recaptcha', function ($app) { |
|
107 | + $this->app->singleton('recaptcha', function($app) { |
|
108 | 108 | |
109 | 109 | $recaptcha_class = ''; |
110 | 110 |
@@ -69,13 +69,13 @@ discard block |
||
69 | 69 | // http_build_query($properties, null, '" ', PHP_QUERY_RFC3986)) . '"'; |
70 | 70 | $temp_properties = []; |
71 | 71 | foreach ($properties as $k => $v) { |
72 | - $temp_properties[] = $k . '="' . $v . '"'; |
|
72 | + $temp_properties[] = $k.'="'.$v.'"'; |
|
73 | 73 | } |
74 | 74 | |
75 | 75 | $tag_properties = implode(" ", $temp_properties); |
76 | 76 | } |
77 | 77 | |
78 | - return ($this->version == 'invisible') ? '<button ' . $tag_properties . '>' . $button_label . '</button>' : ''; |
|
78 | + return ($this->version == 'invisible') ? '<button '.$tag_properties.'>'.$button_label.'</button>' : ''; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | } |
101 | 101 | $html .= '<script> |
102 | 102 | function biscolabLaravelReCaptcha(token) { |
103 | - document.getElementById("' . $form_id . '").submit(); |
|
103 | + document.getElementById("' . $form_id.'").submit(); |
|
104 | 104 | } |
105 | 105 | </script>'; |
106 | 106 |
@@ -66,8 +66,8 @@ |
||
66 | 66 | |
67 | 67 | $validate_function = " |
68 | 68 | fetch('/" . config('recaptcha.default_validation_route', |
69 | - 'biscolab-recaptcha/validate') . "?" . config('recaptcha.default_token_parameter_name', |
|
70 | - 'token') . "=' + token, { |
|
69 | + 'biscolab-recaptcha/validate')."?".config('recaptcha.default_token_parameter_name', |
|
70 | + 'token')."=' + token, { |
|
71 | 71 | headers: { |
72 | 72 | \"X-Requested-With\": \"XMLHttpRequest\", |
73 | 73 | \"X-CSRF-TOKEN\": csrfToken.content |