@@ -16,12 +16,12 @@ discard block |
||
16 | 16 | * @param string $path 目标路径 |
17 | 17 | * @return string|null 返回格式化结果,如果路径不存在则返回NULL |
18 | 18 | */ |
19 | - public static function format(string $path):?string |
|
19 | + public static function format(string $path): ?string |
|
20 | 20 | { |
21 | 21 | if (strlen(trim($path)) === 0) { |
22 | 22 | return null; |
23 | 23 | } |
24 | - return static::existCharset($path, ['GBK','GB2312','BIG5']); |
|
24 | + return static::existCharset($path, ['GBK', 'GB2312', 'BIG5']); |
|
25 | 25 | } |
26 | 26 | |
27 | 27 | /** |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | * @param array $charset |
30 | 30 | * @return string|null |
31 | 31 | */ |
32 | - public static function existCharset(string $path, array $charset):?string |
|
32 | + public static function existCharset(string $path, array $charset): ?string |
|
33 | 33 | { |
34 | 34 | $abspath = static::toAbsolutePath($path); |
35 | 35 | if (static::existCase($abspath)) { |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | } |
167 | 167 | } |
168 | 168 | } catch (Exception $e) { |
169 | - echo '<div style="color:red">' . $e->getMessage() . '</div>'; |
|
169 | + echo '<div style="color:red">'.$e->getMessage().'</div>'; |
|
170 | 170 | return; |
171 | 171 | } |
172 | 172 | } |
@@ -188,9 +188,9 @@ discard block |
||
188 | 188 | return ob_get_clean() ?: ''; |
189 | 189 | } |
190 | 190 | throw new NoTemplateFoundException( |
191 | - 'missing dest at ' . $path , |
|
191 | + 'missing dest at '.$path, |
|
192 | 192 | E_USER_ERROR, |
193 | - $path , |
|
193 | + $path, |
|
194 | 194 | 1 |
195 | 195 | ); |
196 | 196 | } |