| Conditions | 5 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 33 | public function validate(VerifyReCaptcha $verify, Response $response): ?string |
||
| 34 | { |
||
| 35 | if ($verify->getChallengeTimeout() && $response->getChallengeTs()) { |
||
| 36 | $challengeTs = strtotime($response->getChallengeTs()); |
||
| 37 | |||
| 38 | if ($challengeTs > 0 && time() - $challengeTs > $verify->getChallengeTimeout()) { |
||
| 39 | return self::E_CHALLENGE_TIMEOUT; |
||
| 40 | } |
||
| 41 | } |
||
| 42 | |||
| 43 | return null; |
||
| 44 | } |
||
| 46 |