@@ -95,20 +95,20 @@ discard block |
||
| 95 | 95 | } |
| 96 | 96 | if (!$this->config->has('app.import')) { |
| 97 | 97 | $this->config->set('app.import', [ |
| 98 | - 0 => \constant('NEBULA_APP').'/' .'share', |
|
| 98 | + 0 => \constant('NEBULA_APP').'/'.'share', |
|
| 99 | 99 | ]); |
| 100 | 100 | } |
| 101 | 101 | if (!$this->config->has('app.resource')) { |
| 102 | 102 | $this->config->set('app.resource', [ |
| 103 | - 0 => \constant('NEBULA_APP').'/' .'resource', |
|
| 103 | + 0 => \constant('NEBULA_APP').'/'.'resource', |
|
| 104 | 104 | ]); |
| 105 | 105 | } |
| 106 | 106 | if (!$this->config->has('app.module.scan-path')) { |
| 107 | 107 | $this->config->set('app.module.scan-path', [ |
| 108 | - 0 => \constant('NEBULA_APP').'/' .'modules', |
|
| 108 | + 0 => \constant('NEBULA_APP').'/'.'modules', |
|
| 109 | 109 | ]); |
| 110 | 110 | } |
| 111 | - $timezone = defined('DEFAULT_TIMEZONE')?constant('DEFAULT_TIMEZONE'):'PRC'; |
|
| 111 | + $timezone = defined('DEFAULT_TIMEZONE') ?constant('DEFAULT_TIMEZONE') : 'PRC'; |
|
| 112 | 112 | date_default_timezone_set($this->config->get('app.timezone', $timezone)); |
| 113 | 113 | } |
| 114 | 114 | |
@@ -123,10 +123,10 @@ discard block |
||
| 123 | 123 | $logger = (new Runnable($this->getConfig()->get('app.logger-build', [$this, 'buildLogger'])))->run(); |
| 124 | 124 | $debugger = new Debugger; |
| 125 | 125 | |
| 126 | - $debugger->addAttribute('remote-ip' , $this->getRequest()->ip() ); |
|
| 127 | - $debugger->addAttribute('request-uri' , $this->getRequest()->getUrl()); |
|
| 128 | - $debugger->addAttribute('request-method' , $this->getRequest()->getMethod()); |
|
| 129 | - $debugger->addAttribute('request-time' , date('Y-m-d H:i:s', \constant('NEBULA_START_TIME'))); |
|
| 126 | + $debugger->addAttribute('remote-ip', $this->getRequest()->ip()); |
|
| 127 | + $debugger->addAttribute('request-uri', $this->getRequest()->getUrl()); |
|
| 128 | + $debugger->addAttribute('request-method', $this->getRequest()->getMethod()); |
|
| 129 | + $debugger->addAttribute('request-time', date('Y-m-d H:i:s', \constant('NEBULA_START_TIME'))); |
|
| 130 | 130 | |
| 131 | 131 | $debugger->applyConfig([ |
| 132 | 132 | 'start-time' => \constant('NEBULA_START_TIME'), |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | */ |
| 193 | 193 | public function run() |
| 194 | 194 | { |
| 195 | - $className = $this->config->get('app.application', Application::class); |
|
| 195 | + $className = $this->config->get('app.application', Application::class); |
|
| 196 | 196 | $this->application = Runnable::newClassInstance($className); |
| 197 | 197 | $this->application->setContext($this); |
| 198 | 198 | $this->application->setPath($this->path); |
@@ -84,9 +84,9 @@ discard block |
||
| 84 | 84 | |
| 85 | 85 | public function getRoute(string $groupName): GroupRoutes |
| 86 | 86 | { |
| 87 | - $group = $groupName === 'default' ? '': '-'. $groupName; |
|
| 88 | - $routeConfig = $this->getConfigFrom('route'.$group, ['group' => $group,]); |
|
| 89 | - $routes = new GroupRoutes($groupName); |
|
| 87 | + $group = $groupName === 'default' ? '' : '-'.$groupName; |
|
| 88 | + $routeConfig = $this->getConfigFrom('route'.$group, ['group' => $group, ]); |
|
| 89 | + $routes = new GroupRoutes($groupName); |
|
| 90 | 90 | if (\is_array($routeConfig)) { |
| 91 | 91 | // debug()->debug('load route {group} from {module}',['group'=>$groupName, 'module' => $this->getFullName()]); |
| 92 | 92 | $prefix = $this->config->get('route.prefix', ''); |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | public function getFullName() |
| 143 | 143 | { |
| 144 | - return $this->name .':'. $this->version; |
|
| 144 | + return $this->name.':'.$this->version; |
|
| 145 | 145 | } |
| 146 | 146 | |
| 147 | 147 | /** |