Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit ba26486

Browse files
committed
Google reCAPTCHA v3 full support
skipByIp function optimization
1 parent e81a373 commit ba26486

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ReCaptchaBuilder.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function getVersion(): string {
9999
*
100100
* @return ReCaptchaBuilder
101101
*/
102-
public function setSkipByIp(bool $skip_by_ip): ReCaptchaBuilder{
102+
public function setSkipByIp(bool $skip_by_ip): ReCaptchaBuilder {
103103
$this->skip_by_ip = $skip_by_ip;
104104

105105
return $this;
@@ -112,9 +112,7 @@ public function setSkipByIp(bool $skip_by_ip): ReCaptchaBuilder{
112112
*/
113113
public function skipByIp(): bool {
114114

115-
$skip_ip = (config('recaptcha.skip_ip')) ? config('recaptcha.skip_ip') : [];
116-
117-
return (in_array(request()->ip(), $skip_ip));
115+
return (in_array(request()->ip(), config('recaptcha.skip_ip', [])));
118116
}
119117

120118
/**

0 commit comments

Comments
 (0)