@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * @copyright Copyright (c) 2016 ublaboo <[email protected]> |
@@ -133,7 +133,7 @@ discard block |
||
133 | 133 | |
134 | 134 | file_put_contents( |
135 | 135 | "{$this->api_dir}/{$file_name}.php", |
136 | - $this->getHttpAuthSnippet() . $template |
|
136 | + $this->getHttpAuthSnippet().$template |
|
137 | 137 | ); |
138 | 138 | } |
139 | 139 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | file_put_contents( |
154 | 154 | "{$this->api_dir}/index.php", |
155 | - $this->getHttpAuthSnippet() . $template |
|
155 | + $this->getHttpAuthSnippet().$template |
|
156 | 156 | ); |
157 | 157 | } |
158 | 158 | |
@@ -186,17 +186,17 @@ discard block |
||
186 | 186 | |
187 | 187 | $template->addFilter(null, 'Ublaboo\ApiDocu\TemplateFilters::common'); |
188 | 188 | |
189 | - $template->setFile(__DIR__ . '/templates/' . $which); |
|
189 | + $template->setFile(__DIR__.'/templates/'.$which); |
|
190 | 190 | |
191 | 191 | if ($template instanceof Nette\Application\UI\ITemplate) { |
192 | - $template->base_dir = __DIR__ . '/templates'; |
|
192 | + $template->base_dir = __DIR__.'/templates'; |
|
193 | 193 | } |
194 | 194 | |
195 | - $template->addFilter('routeMaskStyles', function ($mask) { |
|
195 | + $template->addFilter('routeMaskStyles', function($mask) { |
|
196 | 196 | return str_replace(['<', '>'], ['<span class="apiDocu-mask-param"><', '></span>'], $mask); |
197 | 197 | }); |
198 | 198 | |
199 | - $template->addFilter('apiDocuResponseCode', function ($code) { |
|
199 | + $template->addFilter('apiDocuResponseCode', function($code) { |
|
200 | 200 | if ($code >= 200 && $code <= 202) { |
201 | 201 | return "<span class=\"apiDocu-code-success\">{$code}</span>"; |
202 | 202 | } elseif ($code >= 300 && $code < 500) { |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * @copyright Copyright (c) 2016 ublaboo <[email protected]> |
@@ -1,6 +1,6 @@ discard block |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * @copyright Copyright (c) 2016 ublaboo <[email protected]> |
@@ -27,8 +27,8 @@ discard block |
||
27 | 27 | $text = nl2br($text); |
28 | 28 | $text = str_replace(["\n", "\n\r", "\r\n", "\r"], '', $text); |
29 | 29 | |
30 | - $text = preg_replace_callback('/<json><br \/>(.*?)<\/json>/s', function ($item) { |
|
31 | - $s = '<br><pre class="apiDocu-json">' . str_replace('<br>', '', end($item)) . '</pre>'; |
|
30 | + $text = preg_replace_callback('/<json><br \/>(.*?)<\/json>/s', function($item) { |
|
31 | + $s = '<br><pre class="apiDocu-json">'.str_replace('<br>', '', end($item)).'</pre>'; |
|
32 | 32 | $s = preg_replace('/(\s)"([^"]+)"/', '$1<span class="apiDocu-string">"$2"</span>', $s); |
33 | 33 | $s = preg_replace('/\/\/(.*?)<br \/>/', '<span class="apiDocu-comment">//$1</span><br>', $s); |
34 | 34 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | /** |
6 | 6 | * @copyright Copyright (c) 2016 ublaboo <[email protected]> |