@@ -18,10 +18,10 @@ |
||
18 | 18 | protected $tag = [ |
19 | 19 | 'raw' => ['{{!', '}}', '<?php echo $code; ?>'], |
20 | 20 | 'comment' => ['{--', '--}', '<?php /* $code */ ?>'], |
21 | - 'echo' => [ '{{', '}}', '<?php echo htmlspecialchars($this->application->_($code), ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5); ?>' ], |
|
21 | + 'echo' => ['{{', '}}', '<?php echo htmlspecialchars($this->application->_($code), ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5); ?>'], |
|
22 | 22 | 'string' => ['{=', '}', '<?php echo htmlspecialchars($this->application->_("$code"), ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5); ?>'], |
23 | - 'raw-string' => ['@{', '}', '<?php echo htmlspecialchars($code, ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5); ?>' ], |
|
24 | - 'event' => ['{:', '}', '<?php $this->application->event()->exec("$code", [$this]); ?>' ], |
|
23 | + 'raw-string' => ['@{', '}', '<?php echo htmlspecialchars($code, ENT_SUBSTITUTE | ENT_QUOTES | ENT_HTML5); ?>'], |
|
24 | + 'event' => ['{:', '}', '<?php $this->application->event()->exec("$code", [$this]); ?>'], |
|
25 | 25 | ]; |
26 | 26 | |
27 | 27 | public function init() |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | * @param string $path |
80 | 80 | * @return Module|null |
81 | 81 | */ |
82 | - public function guess(string $path):?Module |
|
82 | + public function guess(string $path): ?Module |
|
83 | 83 | { |
84 | 84 | foreach ($this->module as $module) { |
85 | 85 | if (FileSystem::isOverflowPath($module->getPath(), $path) === false) { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * @throws ApplicationException |
115 | 115 | * @return Module|null |
116 | 116 | */ |
117 | - public function get(string $name):?Module |
|
117 | + public function get(string $name): ?Module |
|
118 | 118 | { |
119 | 119 | $full = $this->getFullName($name); |
120 | 120 | return $this->module[$full] ?? null; |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | if (array_key_exists($version, $this->knownsFullName[$sortName])) { |
210 | 210 | return $this->knownsFullName[$sortName][$version]; |
211 | 211 | } |
212 | - return $hasVersion?$sortName.':'.$version:end($this->knownsFullName[$sortName]); |
|
212 | + return $hasVersion ? $sortName.':'.$version : end($this->knownsFullName[$sortName]); |
|
213 | 213 | } |
214 | 214 | |
215 | 215 | protected function getLikeName(string $name):string |
@@ -8,12 +8,12 @@ |
||
8 | 8 | use suda\framework\http\HTTPRequest; |
9 | 9 | use suda\application\builder\ApplicationBuilder; |
10 | 10 | |
11 | -require_once __DIR__ .'/loader.php'; |
|
11 | +require_once __DIR__.'/loader.php'; |
|
12 | 12 | |
13 | 13 | // 初始化系统加载器 |
14 | 14 | $loader = new Loader; |
15 | 15 | $loader->register(); |
16 | -$loader->addIncludePath(SUDA_SYSTEM .'/src', 'suda'); |
|
16 | +$loader->addIncludePath(SUDA_SYSTEM.'/src', 'suda'); |
|
17 | 17 | // 初始化数据目录 |
18 | 18 | defined('SUDA_DATA') or define('SUDA_DATA', Path::toAbsolutePath('~/data')); |
19 | 19 | defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP.'/manifest'); |