| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 20 | public function isValid ($value) |
||
| 21 | { |
||
| 22 | $response = \Requests::post(self::ENDPOINT, array(), array( |
||
| 23 | 'secret' => $this->recaptchaField->getSecretKey(), |
||
| 24 | 'response' => $value, |
||
| 25 | 'remoteip' => $_SERVER['REMOTE_ADDR'] |
||
| 26 | )); |
||
| 27 | $data = json_decode($response->body, true); |
||
| 28 | return $data !== null ? $data['success'] : false; |
||
| 29 | } |
||
| 30 | |||
| 39 | } |