@@ -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 | |
@@ -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 | } |
@@ -153,14 +153,14 @@ discard block |
||
| 153 | 153 | $str .= "###{$this->getText(['slug', 'menu'])}" . PHP_EOL; |
| 154 | 154 | $str .= $this->viewMenu() . PHP_EOL . PHP_EOL; |
| 155 | 155 | |
| 156 | - $str .= "###{$this->getText(['slug','menu','desc'])}" . PHP_EOL; |
|
| 156 | + $str .= "###{$this->getText(['slug', 'menu', 'desc'])}" . PHP_EOL; |
|
| 157 | 157 | $str .= $this->getText(['readme', 'main', 'desc']) . PHP_EOL . PHP_EOL; |
| 158 | 158 | |
| 159 | - $str .= "###{$this->getText(['slug','menu','features'])}" . PHP_EOL; |
|
| 159 | + $str .= "###{$this->getText(['slug', 'menu', 'features'])}" . PHP_EOL; |
|
| 160 | 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; |
|
| 162 | + $str .= "###{$this->getText(['slug', 'menu', 'services'])}" . PHP_EOL; |
|
| 163 | + $str .= "{$this->getText(['readme', 'main', 'services'])}" . PHP_EOL . PHP_EOL; |
|
| 164 | 164 | $str .= "{$this->viewServices()}" . PHP_EOL . PHP_EOL; |
| 165 | 165 | |
| 166 | 166 | |