Completed
Push — master ( 24e01c...e70b48 )
by Владислав
04:29 queued 02:12
created
tests/wiki.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -24,23 +24,23 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/core/DeCaptchaWiki.php 2 patches
Doc Comments   +14 added lines, -2 removed lines patch added patch discarded remove patch
@@ -14,11 +14,17 @@  discard block
 block discarded – undo
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;
@@ -312,10 +318,10 @@  discard block
 block discarded – undo
312 318
     }
313 319
 
314 320
     /**
315
-     * @param string|array $name
321
+     * @param string[] $name
316 322
      * @param string       $separator
317 323
      *
318
-     * @return string|array
324
+     * @return string
319 325
      */
320 326
     public function getText($name, $separator = '; ')
321 327
     {
@@ -541,6 +547,9 @@  discard block
 block discarded – undo
541 547
         return $str;
542 548
     }
543 549
 
550
+    /**
551
+     * @param string $keyMask
552
+     */
544 553
     private function getNameConst($keyMask, $value)
545 554
     {
546 555
         $class = $this->class;
@@ -578,6 +587,9 @@  discard block
 block discarded – undo
578 587
         return $str;
579 588
     }
580 589
 
590
+    /**
591
+     * @param string $lang
592
+     */
581 593
     public function getFileName($lang = null)
582 594
     {
583 595
         if (is_null($lang)) {
Please login to merge, or discard this patch.
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -519,14 +519,14 @@
 block discarded – undo
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'])) {
Please login to merge, or discard this patch.