Completed
Push — master ( aab609...eee53c )
by Pavel
03:23
created
src/Generator.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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]>
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
 
115 115
 		file_put_contents(
116 116
 			"{$this->appDir}/{$fileName}.php",
117
-			$this->getHttpAuthSnippet() . $template
117
+			$this->getHttpAuthSnippet().$template
118 118
 		);
119 119
 	}
120 120
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
 		file_put_contents(
131 131
 			"{$this->appDir}/index.php",
132
-			$this->getHttpAuthSnippet() . $template
132
+			$this->getHttpAuthSnippet().$template
133 133
 		);
134 134
 	}
135 135
 
@@ -156,17 +156,17 @@  discard block
 block discarded – undo
156 156
 
157 157
 		$template->addFilter(null, 'Ublaboo\ApiDocu\TemplateFilters::common');
158 158
 
159
-		$template->setFile(__DIR__ . '/templates/' . $which);
159
+		$template->setFile(__DIR__.'/templates/'.$which);
160 160
 
161 161
 		if ($template instanceof ITemplate) {
162
-			$template->base_dir = __DIR__ . '/templates';
162
+			$template->base_dir = __DIR__.'/templates';
163 163
 		}
164 164
 
165
-		$template->addFilter('routeMaskStyles', function ($mask) {
165
+		$template->addFilter('routeMaskStyles', function($mask) {
166 166
 			return str_replace(['<', '>'], ['<span class="apiDocu-mask-param">&lt;', '&gt;</span>'], $mask);
167 167
 		});
168 168
 
169
-		$template->addFilter('apiDocuResponseCode', function ($code) {
169
+		$template->addFilter('apiDocuResponseCode', function($code) {
170 170
 			if ($code >= 200 && $code <= 202) {
171 171
 				return "<span class=\"apiDocu-code-success\">{$code}</span>";
172 172
 			} elseif ($code >= 300 && $code < 500) {
Please login to merge, or discard this patch.
src/TemplateFilters.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
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]>
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
 
13 13
 class TemplateFilters
14 14
 {
15
-	public static function common(string $filter): ?string
15
+	public static function common(string $filter): ? string
16 16
 	{
17 17
 		if (method_exists(__CLASS__, $filter)) {
18 18
 			$args = func_get_args();
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
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
 
Please login to merge, or discard this patch.