@@ -14,6 +14,9 @@ discard block |
||
| 14 | 14 | protected $class; |
| 15 | 15 | protected $lang = 'en'; |
| 16 | 16 | |
| 17 | + /** |
|
| 18 | + * @param string $lang |
|
| 19 | + */ |
|
| 17 | 20 | public function setLang($lang) |
| 18 | 21 | { |
| 19 | 22 | $this->lang = $lang; |
@@ -312,10 +315,10 @@ discard block |
||
| 312 | 315 | } |
| 313 | 316 | |
| 314 | 317 | /** |
| 315 | - * @param string|array $name |
|
| 318 | + * @param string[] $name |
|
| 316 | 319 | * @param string $separator |
| 317 | 320 | * |
| 318 | - * @return string|array |
|
| 321 | + * @return string |
|
| 319 | 322 | */ |
| 320 | 323 | public function getText($name, $separator = '; ') |
| 321 | 324 | { |
@@ -541,6 +544,9 @@ discard block |
||
| 541 | 544 | return $str; |
| 542 | 545 | } |
| 543 | 546 | |
| 547 | + /** |
|
| 548 | + * @param string $keyMask |
|
| 549 | + */ |
|
| 544 | 550 | protected function getNameConst($keyMask, $value) |
| 545 | 551 | { |
| 546 | 552 | $class = $this->class; |
@@ -578,6 +584,9 @@ discard block |
||
| 578 | 584 | return $str; |
| 579 | 585 | } |
| 580 | 586 | |
| 587 | + /** |
|
| 588 | + * @param string $lang |
|
| 589 | + */ |
|
| 581 | 590 | public function getFileName($lang = null) |
| 582 | 591 | { |
| 583 | 592 | if (is_null($lang)) { |
@@ -596,14 +596,14 @@ |
||
| 596 | 596 | $str .= "+ [{$this->getText(['slug', 'menu', 'another'])}](../docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
| 597 | 597 | $str .= "+ {$this->getText(['slug', 'menu', 'anchor'])}".PHP_EOL; |
| 598 | 598 | foreach ([ |
| 599 | - ['slug', 'link'], |
|
| 600 | - ['slug', 'service', 'desc'], |
|
| 601 | - ['slug', 'price'], |
|
| 602 | - ['slug', 'recognize', 'desc'], |
|
| 603 | - ['install'], |
|
| 604 | - ['example'], |
|
| 605 | - ['slug', 'fields', 'desc'], |
|
| 606 | - ] as $anchor) { |
|
| 599 | + ['slug', 'link'], |
|
| 600 | + ['slug', 'service', 'desc'], |
|
| 601 | + ['slug', 'price'], |
|
| 602 | + ['slug', 'recognize', 'desc'], |
|
| 603 | + ['install'], |
|
| 604 | + ['example'], |
|
| 605 | + ['slug', 'fields', 'desc'], |
|
| 606 | + ] as $anchor) { |
|
| 607 | 607 | $str .= " + [{$this->getText($anchor)}](#".implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))).')'.PHP_EOL; |
| 608 | 608 | } |
| 609 | 609 | if ($this->getText(['menu', 'from_service'])) { |
@@ -5,23 +5,23 @@ |
||
| 5 | 5 | $mainWiki = new \jumper423\decaptcha\core\DeCaptchaWikiMain(new \jumper423\decaptcha\services\RuCaptcha([])); |
| 6 | 6 | foreach (['ru', 'en'] as $lang) { |
| 7 | 7 | foreach ([ |
| 8 | - new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 9 | - new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 10 | - new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 11 | - new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 12 | - new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 13 | - new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 14 | - new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 15 | - new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 16 | - new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 17 | - new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 18 | - new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 19 | - new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 20 | - new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 21 | - new \jumper423\decaptcha\services\Captcha24([]), |
|
| 22 | - new \jumper423\decaptcha\services\Pixodrom([]), |
|
| 23 | - new \jumper423\decaptcha\services\Ripcaptcha([]), |
|
| 24 | - ] as $class) { |
|
| 8 | + new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 9 | + new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 10 | + new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 11 | + new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 12 | + new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 13 | + new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 14 | + new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 15 | + new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 16 | + new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 17 | + new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 18 | + new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 19 | + new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 20 | + new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 21 | + new \jumper423\decaptcha\services\Captcha24([]), |
|
| 22 | + new \jumper423\decaptcha\services\Pixodrom([]), |
|
| 23 | + new \jumper423\decaptcha\services\Ripcaptcha([]), |
|
| 24 | + ] as $class) { |
|
| 25 | 25 | $mainWiki->addClass($class); |
| 26 | 26 | $class->getWiki($lang)->save(); |
| 27 | 27 | } |
@@ -87,12 +87,12 @@ |
||
| 87 | 87 | { |
| 88 | 88 | $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../{$master}docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
| 89 | 89 | foreach ([ |
| 90 | - ['slug', 'menu', 'desc'], |
|
| 91 | - ['slug', 'menu', 'features'], |
|
| 92 | - ['slug', 'menu', 'services'], |
|
| 93 | - ['install'], |
|
| 94 | - ['example'], |
|
| 95 | - ] as $anchor) { |
|
| 90 | + ['slug', 'menu', 'desc'], |
|
| 91 | + ['slug', 'menu', 'features'], |
|
| 92 | + ['slug', 'menu', 'services'], |
|
| 93 | + ['install'], |
|
| 94 | + ['example'], |
|
| 95 | + ] as $anchor) { |
|
| 96 | 96 | $str .= "+ [{$this->getText($anchor)}](#".implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))).')'.PHP_EOL; |
| 97 | 97 | } |
| 98 | 98 | |