Passed
Push — dev ( 752f33...556779 )
by 世昌
02:31
created
suda/src/application/ModuleBag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.
suda/loader/main.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,12 +8,12 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
suda/src/application/loader/ApplicationLoader.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function loadVendorIfExist()
85 85
     {
86
-        $vendorAutoload = $this->application->getPath() . '/vendor/autoload.php';
86
+        $vendorAutoload = $this->application->getPath().'/vendor/autoload.php';
87 87
         if (FileSystem::exist($vendorAutoload)) {
88 88
             require_once $vendorAutoload;
89 89
         }
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     protected function registerModule()
122 122
     {
123
-        $extractPath = $this->application->getDataPath() . '/extract-module';
123
+        $extractPath = $this->application->getDataPath().'/extract-module';
124 124
         FileSystem::make($extractPath);
125 125
         foreach ($this->application->getModulePaths() as $path) {
126 126
             $this->registerModuleFrom($path, $extractPath);
Please login to merge, or discard this patch.