| @@ 380-395 (lines=16) @@ | ||
| 377 | if ($this->texts['recognize_file']) { |
|
| 378 | $str .= "'{$this->getText(['recognize', 'data', 'file'])}'"; |
|
| 379 | } |
|
| 380 | if ($this->texts['recognize_data']) { |
|
| 381 | if ($this->texts['recognize_file']) { |
|
| 382 | $str .= ', '; |
|
| 383 | } |
|
| 384 | $str .= '['.PHP_EOL; |
|
| 385 | foreach ($this->texts['recognize_data'] as $key => $val) { |
|
| 386 | $str .= " {$rc->getShortName()}::{$this->getNameConst('ACTION_FIELD_', $key)} => "; |
|
| 387 | if (is_string($val)) { |
|
| 388 | $str .= "'{$val}'"; |
|
| 389 | } else { |
|
| 390 | $str .= "{$val}"; |
|
| 391 | } |
|
| 392 | $str .= ','.PHP_EOL; |
|
| 393 | } |
|
| 394 | $str .= ']'; |
|
| 395 | } |
|
| 396 | $str .= ')) {'.PHP_EOL; |
|
| 397 | $str .= ' $code = $captcha->getCode();'.PHP_EOL; |
|
| 398 | $str .= '} else {'.PHP_EOL; |
|
| @@ 436-451 (lines=16) @@ | ||
| 433 | if ($this->texts['recognize_file']) { |
|
| 434 | $str .= "'{$this->getText(['recognize', 'data', 'file'])}'"; |
|
| 435 | } |
|
| 436 | if ($this->texts['recognize_data']) { |
|
| 437 | if ($this->texts['recognize_file']) { |
|
| 438 | $str .= ', '; |
|
| 439 | } |
|
| 440 | $str .= '['.PHP_EOL; |
|
| 441 | foreach ($this->texts['recognize_data'] as $key => $val) { |
|
| 442 | $str .= " {$rc->getShortName()}::{$this->getNameConst('ACTION_FIELD_', $key)} => "; |
|
| 443 | if (is_string($val)) { |
|
| 444 | $str .= "'{$val}'"; |
|
| 445 | } else { |
|
| 446 | $str .= "{$val}"; |
|
| 447 | } |
|
| 448 | $str .= ','.PHP_EOL; |
|
| 449 | } |
|
| 450 | $str .= ' ]'; |
|
| 451 | } |
|
| 452 | $str .= ');'.PHP_EOL; |
|
| 453 | $str .= ' $code = $captcha->getCode();'.PHP_EOL; |
|
| 454 | $str .= '} catch (\jumper423\decaptcha\core\DeCaptchaErrors $e) {'.PHP_EOL; |
|