Passed
Push — master ( 79eb06...102376 )
by 世昌
02:35
created
suda/src/application/ApplicationSource.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
         $group = $group ?? $request->getAttribute('group');
37 37
         $default = $default ?? $request->getAttribute('module');
38 38
         $url = $this->route->create($this->getRouteName($name, $default, $group), $parameter, $allowQuery);
39
-        return $this->getUrlIndex($request) . ltrim($url, '/');
39
+        return $this->getUrlIndex($request).ltrim($url, '/');
40 40
     }
41 41
 
42 42
     /**
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $module = $default;
74 74
         }
75 75
         if ($module !== null && ($moduleObj = $this->find($module))) {
76
-            return $moduleObj->getFullName() . ':' . $name;
76
+            return $moduleObj->getFullName().':'.$name;
77 77
         }
78 78
         return $name;
79 79
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         }
96 96
         $prefixGroup = $this->getRouteGroupPrefix($group);
97 97
         if ($module !== null && ($moduleObj = $this->find($module))) {
98
-            return $moduleObj->getFullName() . $prefixGroup . ':' . $name;
98
+            return $moduleObj->getFullName().$prefixGroup.':'.$name;
99 99
         }
100 100
         return $name;
101 101
     }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
     public function getUriBase(Request $request, bool $beautify = true): string
138 138
     {
139 139
         $index = $beautify ? $this->getUrlIndex($request) : $request->getIndex();
140
-        return $request->getUriBase() . $index;
140
+        return $request->getUriBase().$index;
141 141
     }
142 142
 
143 143
     /**
@@ -148,6 +148,6 @@  discard block
 block discarded – undo
148 148
      */
149 149
     protected function getRouteGroupPrefix(?string $group): string
150 150
     {
151
-        return $group === null || $group === 'default' ? '' : '@' . $group;
151
+        return $group === null || $group === 'default' ? '' : '@'.$group;
152 152
     }
153 153
 }
Please login to merge, or discard this patch.
suda/loader/swoole.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/loader.php';
2
+require_once __DIR__.'/loader.php';
3 3
 
4 4
 use Swoole\Http\Server;
5 5
 use suda\swoole\Request;
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
16 16
 // 初始化系统加载器
17 17
 $loader = new Loader;
18 18
 $loader->register();
19
-$loader->addIncludePath(SUDA_SYSTEM . '/src', 'suda');
19
+$loader->addIncludePath(SUDA_SYSTEM.'/src', 'suda');
20 20
 // 创建应用
21 21
 $application = ApplicationBuilder::build($loader, SUDA_APP, SUDA_APP_MANIFEST, SUDA_DATA);
22 22
 // 注册Debug工具
@@ -42,9 +42,9 @@  discard block
 block discarded – undo
42 42
     'log_file' => $logger->getConfig('save-dump-path').'/swoole.log',
43 43
 ]);
44 44
 
45
-$application->getDebug()->setConfig('save-dump-path', SUDA_DEBUG_LOG_PATH . '/dump');
45
+$application->getDebug()->setConfig('save-dump-path', SUDA_DEBUG_LOG_PATH.'/dump');
46 46
 
47
-$http->on('request', function ($request, $response) use ($application, $logger) {
47
+$http->on('request', function($request, $response) use ($application, $logger) {
48 48
     // 拷贝副本
49 49
     $runApplication = clone $application;
50 50
     $runLogger = clone $logger;
Please login to merge, or discard this patch.
suda/loader/main.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -7,15 +7,15 @@  discard block
 block discarded – undo
7 7
 use suda\application\builder\ApplicationBuilder;
8 8
 use suda\framework\http\HTTPResponse as Response;
9 9
 
10
-require_once __DIR__ . '/loader.php';
10
+require_once __DIR__.'/loader.php';
11 11
 
12 12
 // 初始化系统加载器
13 13
 $loader = new Loader;
14 14
 $loader->register();
15
-$loader->addIncludePath(SUDA_SYSTEM . '/src', 'suda');
15
+$loader->addIncludePath(SUDA_SYSTEM.'/src', 'suda');
16 16
 // 初始化数据目录
17 17
 defined('SUDA_DATA') or define('SUDA_DATA', Path::toAbsolutePath('~/data'));
18
-defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP . '/manifest');
18
+defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP.'/manifest');
19 19
 $application = ApplicationBuilder::build($loader, SUDA_APP, SUDA_APP_MANIFEST, SUDA_DATA);
20 20
 $application->registerDebugger();
21 21
 // 调试信息
@@ -24,18 +24,18 @@  discard block
 block discarded – undo
24 24
     'start-memory' => defined('SUDA_START_MEMORY') ? constant('SUDA_START_MEMORY') : memory_get_usage(),
25 25
 ]);
26 26
 // 日志路径
27
-defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', $application->getDataPath() . '/logs');
27
+defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', $application->getDataPath().'/logs');
28 28
 // 文件日志
29 29
 $logger = new FileLogger(
30 30
     [
31 31
         'log-level' => SUDA_DEBUG_LEVEL,
32 32
         'save-path' => SUDA_DEBUG_LOG_PATH,
33
-        'save-dump-path' => SUDA_DEBUG_LOG_PATH . '/dump',
34
-        'save-zip-path' => SUDA_DEBUG_LOG_PATH . '/zip',
33
+        'save-dump-path' => SUDA_DEBUG_LOG_PATH.'/dump',
34
+        'save-zip-path' => SUDA_DEBUG_LOG_PATH.'/zip',
35 35
         'log-format' => '%message%',
36 36
     ]
37 37
 );
38 38
 $application->getDebug()->setLogger($logger);
39
-$application->getDebug()->setConfig('save-dump-path', SUDA_DEBUG_LOG_PATH . '/dump');
39
+$application->getDebug()->setConfig('save-dump-path', SUDA_DEBUG_LOG_PATH.'/dump');
40 40
 $application->run(Request::create(), new Response);
41 41
 exit;
Please login to merge, or discard this patch.