| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | public function testRecaptcha() |
||
| 10 | { |
||
| 11 | $captcha = new \jumper423\decaptcha\services\RuCaptchaReCaptcha([ |
||
| 12 | \jumper423\decaptcha\services\RuCaptchaReCaptcha::PARAM_SPEC_API_KEY => '200a1ed2b6ca001d8171c655658086ed', |
||
| 13 | ]); |
||
| 14 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
||
| 15 | // if ($captcha->recognize([ |
||
|
1 ignored issue
–
show
|
|||
| 16 | // \jumper423\decaptcha\services\RuCaptchaReCaptcha::ACTION_FIELD_GOOGLEKEY => '6Ld2sf4SAAAAAKSgzs0Q13IZhY02Pyo31S2jgOB5', |
||
| 17 | // \jumper423\decaptcha\services\RuCaptchaReCaptcha::ACTION_FIELD_PAGEURL => 'https://patrickhlauke.github.io/recaptcha/', |
||
| 18 | // ])) { |
||
| 19 | // $this->assertEquals('111', $captcha->getCode()); |
||
| 20 | // } else { |
||
| 21 | // $this->assertEquals('222', $captcha->getError()); |
||
| 22 | // } |
||
| 23 | } |
||
| 24 | } |
||
| 25 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.