@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | ]); |
| 18 | 18 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
| 19 | 19 | $captcha->setCauseAnError(true); |
| 20 | - $captcha->recognize(__DIR__.'/data/Captcha.jpg'); |
|
| 20 | + $captcha->recognize(__DIR__ . '/data/Captcha.jpg'); |
|
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function testRecognizeBalanceError2() |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | \jumper423\decaptcha\services\TwoCaptcha::PARAM_SPEC_API_KEY => '200a1ed2b6ca001d8171c655658086ed', |
| 27 | 27 | ]); |
| 28 | 28 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
| 29 | - if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) { |
|
| 29 | + if ($captcha->recognize(__DIR__ . '/data/Captcha.jpg')) { |
|
| 30 | 30 | $this->assertEquals('11111111111111', $captcha->getCode()); |
| 31 | 31 | } else { |
| 32 | 32 | $this->assertEquals('Нулевой либо отрицательный баланс', $captcha->getError()); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function testGetBaseUrl() |
| 20 | 20 | { |
| 21 | 21 | $abstract = $this->newInstance(); |
| 22 | - $getBaseUrlCaller = function () { |
|
| 22 | + $getBaseUrlCaller = function() { |
|
| 23 | 23 | $this->host = 'domain'; |
| 24 | 24 | |
| 25 | 25 | return $this->getBaseUrl(); |
@@ -28,7 +28,7 @@ discard block |
||
| 28 | 28 | $this->assertEquals('http://domain/', $bound()); |
| 29 | 29 | |
| 30 | 30 | $abstract = $this->newInstance(); |
| 31 | - $getBaseUrlCaller = function () { |
|
| 31 | + $getBaseUrlCaller = function() { |
|
| 32 | 32 | $this->host = 'domain'; |
| 33 | 33 | $this->scheme = 'https'; |
| 34 | 34 | |
@@ -62,13 +62,13 @@ discard block |
||
| 62 | 62 | public function testGetFilePath() |
| 63 | 63 | { |
| 64 | 64 | $abstract = $this->newInstance(); |
| 65 | - $getFilePathCaller = function ($val) { |
|
| 65 | + $getFilePathCaller = function($val) { |
|
| 66 | 66 | return $this->getFilePath($val); |
| 67 | 67 | }; |
| 68 | 68 | $bound = $getFilePathCaller->bindTo($abstract, $abstract); |
| 69 | - $this->assertEquals(__DIR__.'/data/Captcha.jpg', $bound(__DIR__.'/data/Captcha.jpg')); |
|
| 69 | + $this->assertEquals(__DIR__ . '/data/Captcha.jpg', $bound(__DIR__ . '/data/Captcha.jpg')); |
|
| 70 | 70 | $filePathUpload = $bound('https://upload.wikimedia.org/wikipedia/commons/6/69/Captcha.jpg'); |
| 71 | - $file1 = file_get_contents(__DIR__.'/data/Captcha.jpg'); |
|
| 71 | + $file1 = file_get_contents(__DIR__ . '/data/Captcha.jpg'); |
|
| 72 | 72 | $file2 = file_get_contents($filePathUpload); |
| 73 | 73 | $this->assertEquals($file1, $file2); |
| 74 | 74 | } |
@@ -80,11 +80,11 @@ discard block |
||
| 80 | 80 | public function testGetFilePathErrorFileNotFound() |
| 81 | 81 | { |
| 82 | 82 | $abstract = $this->newInstance(); |
| 83 | - $getFilePathCaller = function ($val) { |
|
| 83 | + $getFilePathCaller = function($val) { |
|
| 84 | 84 | return $this->getFilePath($val); |
| 85 | 85 | }; |
| 86 | 86 | $bound = $getFilePathCaller->bindTo($abstract, $abstract); |
| 87 | - $bound(__DIR__.'/data/Captcha1.jpg'); |
|
| 87 | + $bound(__DIR__ . '/data/Captcha1.jpg'); |
|
| 88 | 88 | } |
| 89 | 89 | |
| 90 | 90 | /** |
@@ -95,7 +95,7 @@ discard block |
||
| 95 | 95 | public function testGetFilePathErrorFileIsNotLoaded() |
| 96 | 96 | { |
| 97 | 97 | $abstract = $this->newInstance(); |
| 98 | - $getFilePathCaller = function ($val) { |
|
| 98 | + $getFilePathCaller = function($val) { |
|
| 99 | 99 | return $this->getFilePath($val); |
| 100 | 100 | }; |
| 101 | 101 | $bound = $getFilePathCaller->bindTo($abstract, $abstract); |
@@ -117,7 +117,7 @@ discard block |
||
| 117 | 117 | public function testExecutionDelayed() |
| 118 | 118 | { |
| 119 | 119 | $abstract = $this->newInstance(); |
| 120 | - $executionDelayedCaller = function ($second, $call = null) { |
|
| 120 | + $executionDelayedCaller = function($second, $call = null) { |
|
| 121 | 121 | return $this->executionDelayed($second, $call); |
| 122 | 122 | }; |
| 123 | 123 | $bound = $executionDelayedCaller->bindTo($abstract, $abstract); |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | $this->assertTrue(abs($timePassed - 0.1) < 0.035); |
| 129 | 129 | |
| 130 | 130 | $start = microtime(true); |
| 131 | - $bound(0.15, function () { |
|
| 131 | + $bound(0.15, function() { |
|
| 132 | 132 | sleep(0.2); |
| 133 | 133 | }); |
| 134 | 134 | $bound(0.1); |
@@ -136,14 +136,14 @@ discard block |
||
| 136 | 136 | $this->assertTrue(abs($timePassed - 0.25) < 0.035); |
| 137 | 137 | |
| 138 | 138 | $start = microtime(true); |
| 139 | - $bound(0.15, function () { |
|
| 139 | + $bound(0.15, function() { |
|
| 140 | 140 | sleep(0.2); |
| 141 | 141 | }); |
| 142 | 142 | $bound(0.3); |
| 143 | 143 | $timePassed = microtime(true) - $start; |
| 144 | 144 | $this->assertTrue(abs($timePassed - 0.45) < 0.035); |
| 145 | 145 | |
| 146 | - $this->assertEquals(2, $bound(0, function () { |
|
| 146 | + $this->assertEquals(2, $bound(0, function() { |
|
| 147 | 147 | return 2; |
| 148 | 148 | })); |
| 149 | 149 | $this->assertEquals(null, $bound(0)); |
@@ -11,7 +11,7 @@ discard block |
||
| 11 | 11 | \jumper423\decaptcha\services\Anticaptcha::PARAM_SPEC_API_KEY => '5464654645646', |
| 12 | 12 | ]); |
| 13 | 13 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
| 14 | - if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) { |
|
| 14 | + if ($captcha->recognize(__DIR__ . '/data/Captcha.jpg')) { |
|
| 15 | 15 | $this->assertEquals('11111111111111', $captcha->getCode()); |
| 16 | 16 | } else { |
| 17 | 17 | $this->assertEquals('Использован несуществующий key', $captcha->getError()); |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | \jumper423\decaptcha\services\Anticaptcha::ACTION_FIELD_LANGUAGE => 'ru', |
| 26 | 26 | ]); |
| 27 | 27 | $captcha->setErrorLang(\jumper423\decaptcha\core\DeCaptchaErrors::LANG_RU); |
| 28 | - if ($captcha->recognize(__DIR__.'/data/Captcha.jpg')) { |
|
| 28 | + if ($captcha->recognize(__DIR__ . '/data/Captcha.jpg')) { |
|
| 29 | 29 | $this->assertEquals('11111111111111', $captcha->getCode()); |
| 30 | 30 | } else { |
| 31 | 31 | $this->assertEquals('Нет в допустимых значиниях поля: languagePool = ru', $captcha->getError()); |
@@ -101,8 +101,7 @@ discard block |
||
| 101 | 101 | } |
| 102 | 102 | $decodeSetting = $this->decodeSettings[static::DECODE_ACTION][$action]; |
| 103 | 103 | $decodeFormat = array_key_exists(static::DECODE_FORMAT, $decodeSetting) ? |
| 104 | - $decodeSetting[static::DECODE_FORMAT] : |
|
| 105 | - $this->decodeSettings[static::DECODE_FORMAT]; |
|
| 104 | + $decodeSetting[static::DECODE_FORMAT] : $this->decodeSettings[static::DECODE_FORMAT]; |
|
| 106 | 105 | $values = []; |
| 107 | 106 | switch ($decodeFormat) { |
| 108 | 107 | case static::RESPONSE_TYPE_STRING: |
@@ -179,7 +178,7 @@ discard block |
||
| 179 | 178 | */ |
| 180 | 179 | protected function getActionUrl($action) |
| 181 | 180 | { |
| 182 | - return $this->getBaseUrl().$this->actions[$action][static::ACTION_URI]; |
|
| 181 | + return $this->getBaseUrl() . $this->actions[$action][static::ACTION_URI]; |
|
| 183 | 182 | } |
| 184 | 183 | |
| 185 | 184 | /** |
@@ -229,7 +228,7 @@ discard block |
||
| 229 | 228 | return base64_encode(file_get_contents($this->params[$param])); |
| 230 | 229 | } |
| 231 | 230 | |
| 232 | - return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@'.$this->getFilePath($this->params[$param]); |
|
| 231 | + return (version_compare(PHP_VERSION, '5.5.0') >= 0) ? new \CURLFile($this->getFilePath($this->params[$param])) : '@' . $this->getFilePath($this->params[$param]); |
|
| 233 | 232 | case static::PARAM_SPEC_API_KEY: |
| 234 | 233 | return is_callable($this->params[$param]) ? $this->params[$param]() : $this->params[$param]; |
| 235 | 234 | case static::PARAM_SPEC_CAPTCHA: |
@@ -296,7 +295,7 @@ discard block |
||
| 296 | 295 | break; |
| 297 | 296 | } |
| 298 | 297 | if (array_key_exists(self::PARAM_SLUG_ENUM, $settings) && !in_array($value, $settings[static::PARAM_SLUG_ENUM])) { |
| 299 | - throw new DeCaptchaErrors(DeCaptchaErrors::ERROR_PARAM_ENUM, (array_key_exists($field, $this->paramsNames) ? $this->paramsNames[$field] : $field).' = '.$value, $this->errorLang); |
|
| 298 | + throw new DeCaptchaErrors(DeCaptchaErrors::ERROR_PARAM_ENUM, (array_key_exists($field, $this->paramsNames) ? $this->paramsNames[$field] : $field) . ' = ' . $value, $this->errorLang); |
|
| 300 | 299 | } |
| 301 | 300 | $params[$this->paramsNames[$field]] = $value; |
| 302 | 301 | } |
@@ -360,7 +359,7 @@ discard block |
||
| 360 | 359 | foreach ($data as $key => $value) { |
| 361 | 360 | $uri[] = "$key=$value"; |
| 362 | 361 | } |
| 363 | - $url .= '?'.implode('&', $uri); |
|
| 362 | + $url .= '?' . implode('&', $uri); |
|
| 364 | 363 | } |
| 365 | 364 | curl_setopt($ch, CURLOPT_URL, $url); |
| 366 | 365 | if (!$isJson && version_compare(PHP_VERSION, '5.5.0') >= 0 && version_compare(PHP_VERSION, '7.0') < 0 && defined('CURLOPT_SAFE_UPLOAD')) { |
@@ -378,7 +377,7 @@ discard block |
||
| 378 | 377 | curl_setopt($ch, CURLOPT_HTTPHEADER, [ |
| 379 | 378 | 'Content-Type: application/json; charset=utf-8', |
| 380 | 379 | 'Accept: application/json', |
| 381 | - 'Content-Length: '.strlen($data), |
|
| 380 | + 'Content-Length: ' . strlen($data), |
|
| 382 | 381 | ]); |
| 383 | 382 | } |
| 384 | 383 | $result = curl_exec($ch); |
@@ -246,7 +246,7 @@ |
||
| 246 | 246 | */ |
| 247 | 247 | public function getText($name, $separator = '; ') |
| 248 | 248 | { |
| 249 | - $getResult = function ($name, $texts) { |
|
| 249 | + $getResult = function($name, $texts) { |
|
| 250 | 250 | if (is_array($name)) { |
| 251 | 251 | $name = implode('_', $name); |
| 252 | 252 | } |
@@ -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)) { |
@@ -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 | } |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -include_once __DIR__.'/../vendor/autoload.php'; |
|
| 3 | +include_once __DIR__ . '/../vendor/autoload.php'; |
|
| 4 | 4 | |
| 5 | 5 | $mainWiki = new \jumper423\decaptcha\core\DeCaptchaWikiMain(new \jumper423\decaptcha\services\RuCaptcha([])); |
| 6 | 6 | foreach (['ru', 'en'] as $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 | |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | */ |
| 104 | 104 | public function getText($name, $separator = '; ') |
| 105 | 105 | { |
| 106 | - $getResult = function ($name, $texts) { |
|
| 106 | + $getResult = function($name, $texts) { |
|
| 107 | 107 | if (is_array($name)) { |
| 108 | 108 | $name = implode('_', $name); |
| 109 | 109 | } |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | |
| 133 | 133 | protected function viewMenu($master = '') |
| 134 | 134 | { |
| 135 | - $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../{$master}docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
|
| 135 | + $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../{$master}docs/" . $this->getFileName($this->lang == 'ru' ? 'en' : 'ru') . ')' . PHP_EOL; |
|
| 136 | 136 | foreach ([ |
| 137 | 137 | ['slug', 'menu', 'desc'], |
| 138 | 138 | ['slug', 'menu', 'features'], |
@@ -140,7 +140,7 @@ discard block |
||
| 140 | 140 | ['install'], |
| 141 | 141 | ['example'], |
| 142 | 142 | ] as $anchor) { |
| 143 | - $str .= "+ [{$this->getText($anchor)}](#".implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))).')'.PHP_EOL; |
|
| 143 | + $str .= "+ [{$this->getText($anchor)}](#" . implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))) . ')' . PHP_EOL; |
|
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | return $str; |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | } |
| 157 | 157 | $tt[$class->getWiki($this->lang)->getFileName()] = true; |
| 158 | 158 | $fromServiceObjectWiki = $class->getWiki($this->lang); |
| 159 | - $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../{$master}docs/{$fromServiceObjectWiki->getFileName()})".PHP_EOL; |
|
| 159 | + $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../{$master}docs/{$fromServiceObjectWiki->getFileName()})" . PHP_EOL; |
|
| 160 | 160 | } |
| 161 | 161 | |
| 162 | 162 | return $str; |
@@ -164,25 +164,25 @@ discard block |
||
| 164 | 164 | |
| 165 | 165 | public function view($master = '') |
| 166 | 166 | { |
| 167 | - $str = $this->viewHeader().PHP_EOL; |
|
| 167 | + $str = $this->viewHeader() . PHP_EOL; |
|
| 168 | 168 | |
| 169 | - $str .= "###{$this->getText(['slug', 'menu'])}".PHP_EOL; |
|
| 170 | - $str .= $this->viewMenu($master).PHP_EOL.PHP_EOL; |
|
| 169 | + $str .= "###{$this->getText(['slug', 'menu'])}" . PHP_EOL; |
|
| 170 | + $str .= $this->viewMenu($master) . PHP_EOL . PHP_EOL; |
|
| 171 | 171 | |
| 172 | - $str .= "###{$this->getText(['slug', 'menu', 'desc'])}".PHP_EOL; |
|
| 173 | - $str .= $this->getText(['readme', 'main', 'desc']).PHP_EOL.PHP_EOL; |
|
| 172 | + $str .= "###{$this->getText(['slug', 'menu', 'desc'])}" . PHP_EOL; |
|
| 173 | + $str .= $this->getText(['readme', 'main', 'desc']) . PHP_EOL . PHP_EOL; |
|
| 174 | 174 | |
| 175 | - $str .= "###{$this->getText(['slug', 'menu', 'features'])}".PHP_EOL; |
|
| 176 | - $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL).PHP_EOL.PHP_EOL; |
|
| 175 | + $str .= "###{$this->getText(['slug', 'menu', 'features'])}" . PHP_EOL; |
|
| 176 | + $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL) . PHP_EOL . PHP_EOL; |
|
| 177 | 177 | |
| 178 | - $str .= "###{$this->getText(['slug', 'menu', 'services'])}".PHP_EOL; |
|
| 179 | - $str .= "{$this->getText(['readme', 'main', 'services'])}".PHP_EOL.PHP_EOL; |
|
| 180 | - $str .= "{$this->viewServices($master)}".PHP_EOL.PHP_EOL; |
|
| 178 | + $str .= "###{$this->getText(['slug', 'menu', 'services'])}" . PHP_EOL; |
|
| 179 | + $str .= "{$this->getText(['readme', 'main', 'services'])}" . PHP_EOL . PHP_EOL; |
|
| 180 | + $str .= "{$this->viewServices($master)}" . PHP_EOL . PHP_EOL; |
|
| 181 | 181 | |
| 182 | - $str .= "###{$this->getText(['install'])}".PHP_EOL; |
|
| 183 | - $str .= "{$this->viewInstall()}".PHP_EOL.PHP_EOL; |
|
| 184 | - $str .= "###{$this->getText(['example'])}".PHP_EOL; |
|
| 185 | - $str .= "{$this->viewExamples()}".PHP_EOL.PHP_EOL; |
|
| 182 | + $str .= "###{$this->getText(['install'])}" . PHP_EOL; |
|
| 183 | + $str .= "{$this->viewInstall()}" . PHP_EOL . PHP_EOL; |
|
| 184 | + $str .= "###{$this->getText(['example'])}" . PHP_EOL; |
|
| 185 | + $str .= "{$this->viewExamples()}" . PHP_EOL . PHP_EOL; |
|
| 186 | 186 | |
| 187 | 187 | return $str; |
| 188 | 188 | } |
@@ -193,12 +193,12 @@ discard block |
||
| 193 | 193 | $lang = $this->lang; |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | - return 'README-'.$lang.'.md'; |
|
| 196 | + return 'README-' . $lang . '.md'; |
|
| 197 | 197 | } |
| 198 | 198 | |
| 199 | 199 | public function save() |
| 200 | 200 | { |
| 201 | - file_put_contents(__DIR__.'/../../docs/'.$this->getFileName(), $this->view()); |
|
| 202 | - file_put_contents(__DIR__.'/../../README.md', $this->view('master/')); |
|
| 201 | + file_put_contents(__DIR__ . '/../../docs/' . $this->getFileName(), $this->view()); |
|
| 202 | + file_put_contents(__DIR__ . '/../../README.md', $this->view('master/')); |
|
| 203 | 203 | } |
| 204 | 204 | } |