Passed
Push — master ( af57fd...f4c898 )
by 世昌
02:38
created
nebula/src/application/Application.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -162,8 +162,8 @@
 block discarded – undo
162 162
      */
163 163
     protected function registerModuleManager()
164 164
     {
165
-       $this->manager = new Manager($this->getContext());
166
-       $this->manager->registerModule();
165
+        $this->manager = new Manager($this->getContext());
166
+        $this->manager->registerModule();
167 167
     }
168 168
 
169 169
     /**
Please login to merge, or discard this patch.
nebula/src/application/module/Module.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
 
85 85
     public function getRoute(string $groupName): GroupRoutes
86 86
     {
87
-        $group = $groupName === 'default' ? '': '-'. $groupName;
88
-        $routeConfig = $this->getConfig('route'.$group, ['group' => $group,]);
89
-        $routes =  new GroupRoutes($groupName);
87
+        $group = $groupName === 'default' ? '' : '-'.$groupName;
88
+        $routeConfig = $this->getConfig('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', '');
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      */
130 130
     public function getFullName()
131 131
     {
132
-        return $this->name .':'. $this->version;
132
+        return $this->name.':'.$this->version;
133 133
     }
134 134
 
135 135
     /**
Please login to merge, or discard this patch.
nebula/src/application/module/Manager.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,8 +148,8 @@
 block discarded – undo
148 148
             $this->module[$module->getFullName()] = $module;
149 149
             $this->getContext()->getDebugger()->info('register module {name} at {path}', ['name'=>$module->getFullName(), 'path'=>$module->getPath()]);
150 150
         }
151
-       $this->buildLoadingOrder('alive', 'loadingOrder');
152
-       $this->buildLoadingOrder('reachable', 'routeLoadingOrder');
151
+        $this->buildLoadingOrder('alive', 'loadingOrder');
152
+        $this->buildLoadingOrder('reachable', 'routeLoadingOrder');
153 153
     }
154 154
     
155 155
     /**
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
     public function registerModule()
141 141
     {
142 142
         $scan = $this->getContext()->getConfig()->get('app.module.scan-path', []);
143
-        $cache = $this->getContext()->getApplication()->getDataPath() .'/module-cache';
143
+        $cache = $this->getContext()->getApplication()->getDataPath().'/module-cache';
144 144
         FileSystem::makes($cache);
145 145
         // 扫描加载
146 146
         foreach (Builder::scan($scan, $cache) as $module) {
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
      * @param string $name
191 191
      * @return Module|null
192 192
      */
193
-    public function find(string $name):?Module
193
+    public function find(string $name): ?Module
194 194
     {
195 195
         $fullName = $this->finder->getFullName($name);
196 196
         return $this->module[$fullName] ?? null;
Please login to merge, or discard this patch.
nebula/src/application/Route.php 3 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public function loadFromModule(Manager $manager) {
50 50
         $groups =  $this->applicaton->getConfig()->get('app.active',['default']);
51 51
         foreach ($groups as $group) {
52
-           $manager->loadRoute($group, $this);
52
+            $manager->loadRoute($group, $this);
53 53
         }
54 54
     }
55 55
 
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      * @return void
48 48
      */
49 49
     public function loadFromModule(Manager $manager) {
50
-        $groups =  $this->applicaton->getConfig()->get('app.active',['default']);
50
+        $groups = $this->applicaton->getConfig()->get('app.active', ['default']);
51 51
         foreach ($groups as $group) {
52 52
            $manager->loadRoute($group, $this);
53 53
         }
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
     public function addGroupRoute(string $group, GroupRoutes $route) {
64 64
         if (\array_key_exists($group, $this->routes)) {
65 65
             $this->routes[$group]->merge($route);
66
-        }else{
66
+        } else {
67 67
             $this->routes[$group] = $route;
68 68
         }
69 69
     } 
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@
 block discarded – undo
63 63
     public function addGroupRoute(string $group, GroupRoutes $route) {
64 64
         if (\array_key_exists($group, $this->routes)) {
65 65
             $this->routes[$group]->merge($route);
66
-        }else{
66
+        } else{
67 67
             $this->routes[$group] = $route;
68 68
         }
69 69
     } 
Please login to merge, or discard this patch.
nebula/loader/web.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -4,15 +4,15 @@
 block discarded – undo
4 4
 use nebula\application\Loader;
5 5
 use nebula\component\request\Request;
6 6
 
7
-require_once __DIR__ .'/loader.php';
7
+require_once __DIR__.'/loader.php';
8 8
 
9 9
 
10 10
 
11 11
 // 初始化系统加载器
12 12
 $loader = new Loader;
13 13
 $loader->register();
14
-$loader->addIncludePath(NEBULA_SYSTEM .'/src', 'nebula');
15
-$loader->import(NEBULA_SYSTEM .'/src/functions.php');
14
+$loader->addIncludePath(NEBULA_SYSTEM.'/src', 'nebula');
15
+$loader->import(NEBULA_SYSTEM.'/src/functions.php');
16 16
 // 初始化请求
17 17
 $request = Request::buildFromServer();
18 18
 $request->apply(true);
Please login to merge, or discard this patch.