| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | View Code Duplication | public function testRecognize() |
|
|
1 ignored issue
–
show
|
|||
| 9 | { |
||
| 10 | $captcha = new \jumper423\decaptcha\services\Anticaptcha([ |
||
| 11 | \jumper423\decaptcha\services\Anticaptcha::PARAM_SPEC_API_KEY => '5464654645646', |
||
| 12 | ]); |
||
| 13 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
||
| 14 | if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) { |
||
| 15 | $this->assertEquals('11111111111111', $captcha->getCode()); |
||
| 16 | } else { |
||
| 17 | $this->assertEquals('Использован несуществующий key', $captcha->getError()); |
||
| 18 | } |
||
| 19 | } |
||
| 20 | |||
| 35 |
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.