| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function __construct( |
||
| 11 | string $response, |
||
| 12 | string $secret, |
||
| 13 | string $hostName, |
||
| 14 | string $action, |
||
| 15 | ?float $minScore = 0.5, |
||
| 16 | ?int $timeout = null |
||
| 17 | ) { |
||
| 18 | $this->response = $response; |
||
| 19 | $this->reCaptcha = $reCaptcha = new ReCaptcha($secret); |
||
| 20 | |||
| 21 | $reCaptcha->setExpectedAction($action); |
||
| 22 | $reCaptcha->setScoreThreshold($minScore); |
||
| 23 | $reCaptcha->setExpectedHostname($hostName); |
||
| 24 | $reCaptcha->setChallengeTimeout($timeout); |
||
| 25 | } |
||
| 39 |