|
@@ -85,7 +85,7 @@ discard block |
|
|
block discarded – undo |
|
85
|
85
|
|
|
86
|
86
|
protected function viewMenu($master = '') |
|
87
|
87
|
{ |
|
88
|
|
- $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../{$master}docs/".$this->getFileName($this->lang == 'ru' ? 'en' : 'ru').')'.PHP_EOL; |
|
|
88
|
+ $str = "+ [{$this->getText(['slug', 'menu', 'another'])}](../{$master}docs/" . $this->getFileName($this->lang == 'ru' ? 'en' : 'ru') . ')' . PHP_EOL; |
|
89
|
89
|
foreach ([ |
|
90
|
90
|
['slug', 'menu', 'desc'], |
|
91
|
91
|
['slug', 'menu', 'features'], |
|
@@ -93,7 +93,7 @@ discard block |
|
|
block discarded – undo |
|
93
|
93
|
['install'], |
|
94
|
94
|
['example'], |
|
95
|
95
|
] as $anchor) { |
|
96
|
|
- $str .= "+ [{$this->getText($anchor)}](#".implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))).')'.PHP_EOL; |
|
|
96
|
+ $str .= "+ [{$this->getText($anchor)}](#" . implode('-', explode(' ', ($this->lang === 'en' ? mb_strtolower($this->getText($anchor)) : $this->getText($anchor)))) . ')' . PHP_EOL; |
|
97
|
97
|
} |
|
98
|
98
|
|
|
99
|
99
|
return $str; |
|
@@ -109,7 +109,7 @@ discard block |
|
|
block discarded – undo |
|
109
|
109
|
} |
|
110
|
110
|
$tt[$class->getWiki($this->lang)->getFileName()] = true; |
|
111
|
111
|
$fromServiceObjectWiki = $class->getWiki($this->lang); |
|
112
|
|
- $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../{$master}docs/{$fromServiceObjectWiki->getFileName()})".PHP_EOL; |
|
|
112
|
+ $str .= "+ [{$fromServiceObjectWiki->getText(['service', 'name'])}](../{$master}docs/{$fromServiceObjectWiki->getFileName()})" . PHP_EOL; |
|
113
|
113
|
} |
|
114
|
114
|
|
|
115
|
115
|
return $str; |
|
@@ -117,25 +117,25 @@ discard block |
|
|
block discarded – undo |
|
117
|
117
|
|
|
118
|
118
|
public function view($master = '') |
|
119
|
119
|
{ |
|
120
|
|
- $str = $this->viewHeader().PHP_EOL; |
|
|
120
|
+ $str = $this->viewHeader() . PHP_EOL; |
|
121
|
121
|
|
|
122
|
|
- $str .= "###{$this->getText(['slug', 'menu'])}".PHP_EOL; |
|
123
|
|
- $str .= $this->viewMenu($master).PHP_EOL.PHP_EOL; |
|
|
122
|
+ $str .= "###{$this->getText(['slug', 'menu'])}" . PHP_EOL; |
|
|
123
|
+ $str .= $this->viewMenu($master) . PHP_EOL . PHP_EOL; |
|
124
|
124
|
|
|
125
|
|
- $str .= "###{$this->getText(['slug', 'menu', 'desc'])}".PHP_EOL; |
|
126
|
|
- $str .= $this->getText(['readme', 'main', 'desc']).PHP_EOL.PHP_EOL; |
|
|
125
|
+ $str .= "###{$this->getText(['slug', 'menu', 'desc'])}" . PHP_EOL; |
|
|
126
|
+ $str .= $this->getText(['readme', 'main', 'desc']) . PHP_EOL . PHP_EOL; |
|
127
|
127
|
|
|
128
|
|
- $str .= "###{$this->getText(['slug', 'menu', 'features'])}".PHP_EOL; |
|
129
|
|
- $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL).PHP_EOL.PHP_EOL; |
|
|
128
|
+ $str .= "###{$this->getText(['slug', 'menu', 'features'])}" . PHP_EOL; |
|
|
129
|
+ $str .= $this->getText(['readme', 'main', 'features'], PHP_EOL) . PHP_EOL . PHP_EOL; |
|
130
|
130
|
|
|
131
|
|
- $str .= "###{$this->getText(['slug', 'menu', 'services'])}".PHP_EOL; |
|
132
|
|
- $str .= "{$this->getText(['readme', 'main', 'services'])}".PHP_EOL.PHP_EOL; |
|
133
|
|
- $str .= "{$this->viewServices($master)}".PHP_EOL.PHP_EOL; |
|
|
131
|
+ $str .= "###{$this->getText(['slug', 'menu', 'services'])}" . PHP_EOL; |
|
|
132
|
+ $str .= "{$this->getText(['readme', 'main', 'services'])}" . PHP_EOL . PHP_EOL; |
|
|
133
|
+ $str .= "{$this->viewServices($master)}" . PHP_EOL . PHP_EOL; |
|
134
|
134
|
|
|
135
|
|
- $str .= "###{$this->getText(['install'])}".PHP_EOL; |
|
136
|
|
- $str .= "{$this->viewInstall()}".PHP_EOL.PHP_EOL; |
|
137
|
|
- $str .= "###{$this->getText(['example'])}".PHP_EOL; |
|
138
|
|
- $str .= "{$this->viewExamples()}".PHP_EOL.PHP_EOL; |
|
|
135
|
+ $str .= "###{$this->getText(['install'])}" . PHP_EOL; |
|
|
136
|
+ $str .= "{$this->viewInstall()}" . PHP_EOL . PHP_EOL; |
|
|
137
|
+ $str .= "###{$this->getText(['example'])}" . PHP_EOL; |
|
|
138
|
+ $str .= "{$this->viewExamples()}" . PHP_EOL . PHP_EOL; |
|
139
|
139
|
|
|
140
|
140
|
return $str; |
|
141
|
141
|
} |
|
@@ -146,12 +146,12 @@ discard block |
|
|
block discarded – undo |
|
146
|
146
|
$lang = $this->lang; |
|
147
|
147
|
} |
|
148
|
148
|
|
|
149
|
|
- return 'README-'.$lang.'.md'; |
|
|
149
|
+ return 'README-' . $lang . '.md'; |
|
150
|
150
|
} |
|
151
|
151
|
|
|
152
|
152
|
public function save() |
|
153
|
153
|
{ |
|
154
|
|
- file_put_contents(__DIR__.'/../../docs/'.$this->getFileName(), $this->view()); |
|
155
|
|
- file_put_contents(__DIR__.'/../../README.md', $this->view('master/')); |
|
|
154
|
+ file_put_contents(__DIR__ . '/../../docs/' . $this->getFileName(), $this->view()); |
|
|
155
|
+ file_put_contents(__DIR__ . '/../../README.md', $this->view('master/')); |
|
156
|
156
|
} |
|
157
|
157
|
} |