@@ -14,11 +14,17 @@ discard block |
||
| 14 | 14 | private $class; |
| 15 | 15 | private $lang = 'en'; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $lang |
|
| 19 | + */ |
|
| 17 | 20 | public function setLang($lang) |
| 18 | 21 | { |
| 19 | 22 | $this->lang = $lang; |
| 20 | 23 | } |
| 21 | 24 | |
| 25 | + /** |
|
| 26 | + * @param DeCaptchaBase $class |
|
| 27 | + */ |
|
| 22 | 28 | public function __construct($class) |
| 23 | 29 | { |
| 24 | 30 | $this->class = $class; |
@@ -251,7 +257,7 @@ discard block |
||
| 251 | 257 | } |
| 252 | 258 | |
| 253 | 259 | /** |
| 254 | - * @param string|array $name |
|
| 260 | + * @param string[] $name |
|
| 255 | 261 | * @param string $separator |
| 256 | 262 | * |
| 257 | 263 | * @return string|array |
@@ -397,6 +403,9 @@ discard block |
||
| 397 | 403 | return $str; |
| 398 | 404 | } |
| 399 | 405 | |
| 406 | + /** |
|
| 407 | + * @param string $keyMask |
|
| 408 | + */ |
|
| 400 | 409 | private function getNameConst($keyMask, $value) |
| 401 | 410 | { |
| 402 | 411 | $constants = (new \ReflectionClass($this->class))->getConstants(); |
@@ -21,20 +21,20 @@ |
||
| 21 | 21 | |
| 22 | 22 | foreach (['ru', 'en'] as $lang) { |
| 23 | 23 | foreach ([ |
| 24 | - new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 25 | - new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 26 | - new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 27 | - new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 28 | - new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 29 | - new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 30 | - new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 31 | - new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 32 | - new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 33 | - new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 34 | - new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 35 | - new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 36 | - new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 37 | - ] as $class) { |
|
| 24 | + new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 25 | + new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 26 | + new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 27 | + new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 28 | + new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 29 | + new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 30 | + new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 31 | + new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 32 | + new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 33 | + new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 34 | + new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 35 | + new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 36 | + new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 37 | + ] as $class) { |
|
| 38 | 38 | $tt = $class->getWiki($lang); |
| 39 | 39 | $tt->save(); |
| 40 | 40 | } |