@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | public function getIpWhitelist() { |
117 | 117 | $whitelist = config('recaptcha.skip_ip', []); |
118 | 118 | |
119 | - if(!is_array($whitelist)) { |
|
119 | + if (!is_array($whitelist)) { |
|
120 | 120 | $whitelist = explode(',', $whitelist); |
121 | 121 | } |
122 | 122 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | } |
164 | 164 | $html .= '<script> |
165 | 165 | function biscolabLaravelReCaptcha(token) { |
166 | - document.getElementById("' . $formId . '").submit(); |
|
166 | + document.getElementById("' . $formId.'").submit(); |
|
167 | 167 | } |
168 | 168 | </script>'; |
169 | 169 | } |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $js_callback_catch = ($js_callback_catch) ? "{$js_callback_catch}(err)" : ''; |
188 | 188 | |
189 | 189 | $validate_function = " |
190 | - fetch('/" . config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate') . "?" . config('recaptcha.default_token_parameter_name', 'token') . "=' + token, { |
|
190 | + fetch('/" . config('recaptcha.default_validation_route', 'biscolab-recaptcha/validate')."?".config('recaptcha.default_token_parameter_name', 'token')."=' + token, { |
|
191 | 191 | headers: { |
192 | 192 | \"X-Requested-With\": \"XMLHttpRequest\", |
193 | 193 | \"X-CSRF-TOKEN\": csrfToken.content |
@@ -252,7 +252,7 @@ discard block |
||
252 | 252 | 'response' => $response, |
253 | 253 | ]); |
254 | 254 | |
255 | - $url = $this->api_url . '?' . $params; |
|
255 | + $url = $this->api_url.'?'.$params; |
|
256 | 256 | |
257 | 257 | if (function_exists('curl_version')) { |
258 | 258 | $curl = curl_init($url); |
@@ -166,8 +166,7 @@ discard block |
||
166 | 166 | document.getElementById("' . $formId . '").submit(); |
167 | 167 | } |
168 | 168 | </script>'; |
169 | - } |
|
170 | - elseif ($this->version == 'v3') { |
|
169 | + } elseif ($this->version == 'v3') { |
|
171 | 170 | |
172 | 171 | $action = array_get($configuration, 'action', 'homepage'); |
173 | 172 | |
@@ -177,8 +176,7 @@ discard block |
||
177 | 176 | if ($js_custom_validation) { |
178 | 177 | |
179 | 178 | $validate_function = ($js_custom_validation) ? "{$js_custom_validation}(token);" : ''; |
180 | - } |
|
181 | - else { |
|
179 | + } else { |
|
182 | 180 | |
183 | 181 | $js_then_callback = array_get($configuration, 'callback_then', ''); |
184 | 182 | $js_callback_catch = array_get($configuration, 'callback_catch', ''); |
@@ -261,8 +259,7 @@ discard block |
||
261 | 259 | curl_setopt($curl, CURLOPT_TIMEOUT, 1); |
262 | 260 | curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); |
263 | 261 | $curl_response = curl_exec($curl); |
264 | - } |
|
265 | - else { |
|
262 | + } else { |
|
266 | 263 | $curl_response = file_get_contents($url); |
267 | 264 | } |
268 | 265 |