@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | */ |
88 | 88 | public function getText($name, $separator = '; ') |
89 | 89 | { |
90 | - $getResult = function ($name, $texts) { |
|
90 | + $getResult = function($name, $texts) { |
|
91 | 91 | if (is_array($name)) { |
92 | 92 | $name = implode('_', $name); |
93 | 93 | } |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | |
117 | 117 | protected function viewMenu() |
118 | 118 | { |
119 | - $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
|
119 | + $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../docs/" . $this->getFileName($this->lang == 'ru' ? 'en' : 'ru') . ')' . PHP_EOL; |
|
120 | 120 | foreach ([ |
121 | 121 | ['slug', 'menu', 'desc'], |
122 | 122 | ['slug', 'menu', 'features'], |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | ['install'], |
125 | 125 | ['example'], |
126 | 126 | ] as $anchor) { |
127 | - $str .= "+ [{$this->getText($anchor)}](#".implode('-', explode(' ', $this->getText($anchor))).')'.PHP_EOL; |
|
127 | + $str .= "+ [{$this->getText($anchor)}](#" . implode('-', explode(' ', $this->getText($anchor))) . ')' . PHP_EOL; |
|
128 | 128 | } |
129 | 129 | |
130 | 130 | return $str; |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | } |
141 | 141 | $tt[$class->getWiki($this->lang)->getFileName()] = true; |
142 | 142 | $fromServiceObjectWiki = $class->getWiki($this->lang); |
143 | - $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../docs/{$fromServiceObjectWiki->getFileName()})".PHP_EOL; |
|
143 | + $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../docs/{$fromServiceObjectWiki->getFileName()})" . PHP_EOL; |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | return $str; |
@@ -148,25 +148,25 @@ discard block |
||
148 | 148 | |
149 | 149 | public function view() |
150 | 150 | { |
151 | - $str = $this->viewHeader().PHP_EOL; |
|
151 | + $str = $this->viewHeader() . PHP_EOL; |
|
152 | 152 | |
153 | - $str .= "###{$this->getText(['slug', 'menu'])}".PHP_EOL; |
|
154 | - $str .= $this->viewMenu().PHP_EOL.PHP_EOL; |
|
153 | + $str .= "###{$this->getText(['slug', 'menu'])}" . PHP_EOL; |
|
154 | + $str .= $this->viewMenu() . PHP_EOL . PHP_EOL; |
|
155 | 155 | |
156 | - $str .= "###{$this->getText(['slug', 'menu', 'desc'])}".PHP_EOL; |
|
157 | - $str .= $this->getText(['readme', 'main', 'desc']).PHP_EOL.PHP_EOL; |
|
156 | + $str .= "###{$this->getText(['slug', 'menu', 'desc'])}" . PHP_EOL; |
|
157 | + $str .= $this->getText(['readme', 'main', 'desc']) . PHP_EOL . PHP_EOL; |
|
158 | 158 | |
159 | - $str .= "###{$this->getText(['slug', 'menu', 'features'])}".PHP_EOL; |
|
160 | - $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL).PHP_EOL.PHP_EOL; |
|
159 | + $str .= "###{$this->getText(['slug', 'menu', 'features'])}" . PHP_EOL; |
|
160 | + $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL) . PHP_EOL . PHP_EOL; |
|
161 | 161 | |
162 | - $str .= "###{$this->getText(['slug', 'menu', 'services'])}".PHP_EOL; |
|
163 | - $str .= "{$this->getText(['readme', 'main', 'services'])}".PHP_EOL.PHP_EOL; |
|
164 | - $str .= "{$this->viewServices()}".PHP_EOL.PHP_EOL; |
|
162 | + $str .= "###{$this->getText(['slug', 'menu', 'services'])}" . PHP_EOL; |
|
163 | + $str .= "{$this->getText(['readme', 'main', 'services'])}" . PHP_EOL . PHP_EOL; |
|
164 | + $str .= "{$this->viewServices()}" . PHP_EOL . PHP_EOL; |
|
165 | 165 | |
166 | - $str .= "###{$this->getText(['install'])}".PHP_EOL; |
|
167 | - $str .= "{$this->viewInstall()}".PHP_EOL.PHP_EOL; |
|
168 | - $str .= "###{$this->getText(['example'])}".PHP_EOL; |
|
169 | - $str .= "{$this->viewExamples()}".PHP_EOL.PHP_EOL; |
|
166 | + $str .= "###{$this->getText(['install'])}" . PHP_EOL; |
|
167 | + $str .= "{$this->viewInstall()}" . PHP_EOL . PHP_EOL; |
|
168 | + $str .= "###{$this->getText(['example'])}" . PHP_EOL; |
|
169 | + $str .= "{$this->viewExamples()}" . PHP_EOL . PHP_EOL; |
|
170 | 170 | |
171 | 171 | return $str; |
172 | 172 | } |
@@ -177,12 +177,12 @@ discard block |
||
177 | 177 | $lang = $this->lang; |
178 | 178 | } |
179 | 179 | |
180 | - return 'README-'.$lang.'.md'; |
|
180 | + return 'README-' . $lang . '.md'; |
|
181 | 181 | } |
182 | 182 | |
183 | 183 | public function save() |
184 | 184 | { |
185 | - file_put_contents(__DIR__.'/../../docs/'.$this->getFileName(), $this->view()); |
|
186 | - file_put_contents(__DIR__.'/../../README.md', $this->view()); |
|
185 | + file_put_contents(__DIR__ . '/../../docs/' . $this->getFileName(), $this->view()); |
|
186 | + file_put_contents(__DIR__ . '/../../README.md', $this->view()); |
|
187 | 187 | } |
188 | 188 | } |
@@ -1,27 +1,27 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once __DIR__.'/../src/core/DeCaptchaErrors.php'; |
|
4 | -include_once __DIR__.'/../src/core/DeCaptchaInterface.php'; |
|
5 | -include_once __DIR__.'/../src/core/DeCaptchaAbstract.php'; |
|
6 | -include_once __DIR__.'/../src/core/DeCaptchaBase.php'; |
|
7 | -include_once __DIR__.'/../src/services/RuCaptcha.php'; |
|
8 | -include_once __DIR__.'/../src/services/RuCaptchaReCaptcha.php'; |
|
9 | -include_once __DIR__.'/../src/services/RuCaptchaInstruction.php'; |
|
10 | -include_once __DIR__.'/../src/services/RuCaptchaGrid.php'; |
|
11 | -include_once __DIR__.'/../src/services/RuCaptchaClick.php'; |
|
12 | -include_once __DIR__.'/../src/services/TwoCaptcha.php'; |
|
13 | -include_once __DIR__.'/../src/services/TwoCaptchaReCaptcha.php'; |
|
14 | -include_once __DIR__.'/../src/services/TwoCaptchaInstruction.php'; |
|
15 | -include_once __DIR__.'/../src/services/TwoCaptchaGrid.php'; |
|
16 | -include_once __DIR__.'/../src/services/TwoCaptchaClick.php'; |
|
17 | -include_once __DIR__.'/../src/services/Anticaptcha.php'; |
|
18 | -include_once __DIR__.'/../src/services/AnticaptchaReCaptchaProxeless.php'; |
|
19 | -include_once __DIR__.'/../src/services/AnticaptchaReCaptcha.php'; |
|
20 | -include_once __DIR__.'/../src/services/Captcha24.php'; |
|
21 | -include_once __DIR__.'/../src/services/Pixodrom.php'; |
|
22 | -include_once __DIR__.'/../src/services/Ripcaptcha.php'; |
|
23 | -include_once __DIR__.'/../src/core/DeCaptchaWiki.php'; |
|
24 | -include_once __DIR__.'/../src/core/DeCaptchaWikiMain.php'; |
|
3 | +include_once __DIR__ . '/../src/core/DeCaptchaErrors.php'; |
|
4 | +include_once __DIR__ . '/../src/core/DeCaptchaInterface.php'; |
|
5 | +include_once __DIR__ . '/../src/core/DeCaptchaAbstract.php'; |
|
6 | +include_once __DIR__ . '/../src/core/DeCaptchaBase.php'; |
|
7 | +include_once __DIR__ . '/../src/services/RuCaptcha.php'; |
|
8 | +include_once __DIR__ . '/../src/services/RuCaptchaReCaptcha.php'; |
|
9 | +include_once __DIR__ . '/../src/services/RuCaptchaInstruction.php'; |
|
10 | +include_once __DIR__ . '/../src/services/RuCaptchaGrid.php'; |
|
11 | +include_once __DIR__ . '/../src/services/RuCaptchaClick.php'; |
|
12 | +include_once __DIR__ . '/../src/services/TwoCaptcha.php'; |
|
13 | +include_once __DIR__ . '/../src/services/TwoCaptchaReCaptcha.php'; |
|
14 | +include_once __DIR__ . '/../src/services/TwoCaptchaInstruction.php'; |
|
15 | +include_once __DIR__ . '/../src/services/TwoCaptchaGrid.php'; |
|
16 | +include_once __DIR__ . '/../src/services/TwoCaptchaClick.php'; |
|
17 | +include_once __DIR__ . '/../src/services/Anticaptcha.php'; |
|
18 | +include_once __DIR__ . '/../src/services/AnticaptchaReCaptchaProxeless.php'; |
|
19 | +include_once __DIR__ . '/../src/services/AnticaptchaReCaptcha.php'; |
|
20 | +include_once __DIR__ . '/../src/services/Captcha24.php'; |
|
21 | +include_once __DIR__ . '/../src/services/Pixodrom.php'; |
|
22 | +include_once __DIR__ . '/../src/services/Ripcaptcha.php'; |
|
23 | +include_once __DIR__ . '/../src/core/DeCaptchaWiki.php'; |
|
24 | +include_once __DIR__ . '/../src/core/DeCaptchaWikiMain.php'; |
|
25 | 25 | |
26 | 26 | $mainWiki = new \jumper423\decaptcha\core\DeCaptchaWikiMain(new \jumper423\decaptcha\services\RuCaptcha([])); |
27 | 27 | foreach (['ru', 'en'] as $lang) { |