This repository has been archived by the owner on Feb 17, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from DarkGhostHunter/master
Fixed macros and threshold calculation.
- Loading branch information
Showing
5 changed files
with
86 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace DarkGhostHunter\Captchavel; | ||
|
||
use DarkGhostHunter\Captchavel\Http\ReCaptchaResponse; | ||
|
||
class RequestMacro | ||
{ | ||
/** | ||
* Check if the reCAPTCHA response is equal or above threshold score. | ||
* | ||
* @return bool | ||
*/ | ||
public static function isHuman() | ||
{ | ||
return app(ReCaptchaResponse::class)->isHuman(); | ||
} | ||
|
||
/** | ||
* Check if the reCAPTCHA response is below threshold score. | ||
* | ||
* @return bool | ||
*/ | ||
public static function isRobot() | ||
{ | ||
return ! static::isHuman(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters