@@ -24,23 +24,23 @@ |
||
| 24 | 24 | |
| 25 | 25 | foreach (['ru', 'en'] as $lang) { |
| 26 | 26 | foreach ([ |
| 27 | - new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 28 | - new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 29 | - new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 30 | - new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 31 | - new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 32 | - new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 33 | - new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 34 | - new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 35 | - new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 36 | - new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 37 | - new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 38 | - new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 39 | - new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 40 | - new \jumper423\decaptcha\services\Captcha24([]), |
|
| 41 | - new \jumper423\decaptcha\services\Pixodrom([]), |
|
| 42 | - new \jumper423\decaptcha\services\Ripcaptcha([]), |
|
| 43 | - ] as $class) { |
|
| 27 | + new \jumper423\decaptcha\services\RuCaptcha([]), |
|
| 28 | + new \jumper423\decaptcha\services\RuCaptchaReCaptcha([]), |
|
| 29 | + new \jumper423\decaptcha\services\RuCaptchaInstruction([]), |
|
| 30 | + new \jumper423\decaptcha\services\RuCaptchaGrid([]), |
|
| 31 | + new \jumper423\decaptcha\services\RuCaptchaClick([]), |
|
| 32 | + new \jumper423\decaptcha\services\TwoCaptcha([]), |
|
| 33 | + new \jumper423\decaptcha\services\TwoCaptchaReCaptcha([]), |
|
| 34 | + new \jumper423\decaptcha\services\TwoCaptchaInstruction([]), |
|
| 35 | + new \jumper423\decaptcha\services\TwoCaptchaGrid([]), |
|
| 36 | + new \jumper423\decaptcha\services\TwoCaptchaClick([]), |
|
| 37 | + new \jumper423\decaptcha\services\Anticaptcha([]), |
|
| 38 | + new \jumper423\decaptcha\services\AnticaptchaReCaptcha([]), |
|
| 39 | + new \jumper423\decaptcha\services\AnticaptchaReCaptchaProxeless([]), |
|
| 40 | + new \jumper423\decaptcha\services\Captcha24([]), |
|
| 41 | + new \jumper423\decaptcha\services\Pixodrom([]), |
|
| 42 | + new \jumper423\decaptcha\services\Ripcaptcha([]), |
|
| 43 | + ] as $class) { |
|
| 44 | 44 | $tt = $class->getWiki($lang); |
| 45 | 45 | $tt->save(); |
| 46 | 46 | } |
@@ -519,14 +519,14 @@ |
||
| 519 | 519 | $str .= "+ [{$this->getText(['slug', 'menu', 'another'])}](../blob/master/docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
| 520 | 520 | $str .= "+ {$this->getText(['slug', 'menu', 'anchor'])}".PHP_EOL; |
| 521 | 521 | foreach ([ |
| 522 | - ['slug', 'link'], |
|
| 523 | - ['slug', 'service', 'desc'], |
|
| 524 | - ['slug', 'price'], |
|
| 525 | - ['slug', 'recognize', 'desc'], |
|
| 526 | - ['install'], |
|
| 527 | - ['example'], |
|
| 528 | - ['slug', 'fields', 'desc'], |
|
| 529 | - ] as $anchor) { |
|
| 522 | + ['slug', 'link'], |
|
| 523 | + ['slug', 'service', 'desc'], |
|
| 524 | + ['slug', 'price'], |
|
| 525 | + ['slug', 'recognize', 'desc'], |
|
| 526 | + ['install'], |
|
| 527 | + ['example'], |
|
| 528 | + ['slug', 'fields', 'desc'], |
|
| 529 | + ] as $anchor) { |
|
| 530 | 530 | $str .= " + [{$this->getText($anchor)}](#".implode('-', explode(' ', $this->getText($anchor))).')'.PHP_EOL; |
| 531 | 531 | } |
| 532 | 532 | if ($this->getText(['menu', 'from_service'])) { |
@@ -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)) { |
@@ -119,12 +119,12 @@ |
||
| 119 | 119 | { |
| 120 | 120 | $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../docs/" . $this->getFileName($this->lang == 'ru' ? 'en' : 'ru') . ')' . PHP_EOL; |
| 121 | 121 | foreach ([ |
| 122 | - ['slug', 'menu', 'desc'], |
|
| 123 | - ['slug', 'menu', 'features'], |
|
| 124 | - ['slug', 'menu', 'services'], |
|
| 125 | - ['install'], |
|
| 126 | - ['example'], |
|
| 127 | - ] as $anchor) { |
|
| 122 | + ['slug', 'menu', 'desc'], |
|
| 123 | + ['slug', 'menu', 'features'], |
|
| 124 | + ['slug', 'menu', 'services'], |
|
| 125 | + ['install'], |
|
| 126 | + ['example'], |
|
| 127 | + ] as $anchor) { |
|
| 128 | 128 | $str .= "+ [{$this->getText($anchor)}](#" . implode('-', explode(' ', $this->getText($anchor))) . ')' . PHP_EOL; |
| 129 | 129 | } |
| 130 | 130 | |