Passed
Push — dev ( 6277c8...732a36 )
by 世昌
02:37
created
suda/src/application/database/Table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
     public function __construct(string $tableName, string $connection = 'default', bool $raw = false)
27 27
     {
28 28
         parent::__construct(
29
-            $this->initStruct($tableName,$raw),
29
+            $this->initStruct($tableName, $raw),
30 30
             Database::getDataSource($connection),
31 31
             $this);
32 32
     }
Please login to merge, or discard this patch.
suda/src/application/debug/ExceptionCatcher.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,8 +72,8 @@
 block discarded – undo
72 72
                 'context' => $this->context,
73 73
                 'backtrace' => $throwable->getTrace(),
74 74
             ];
75
-            $exceptionHash = md5($throwable->getFile() . $throwable->getLine() . $throwable->getCode());
76
-            $path = $dumpPath . '/' . microtime(true) . '.' . substr($exceptionHash, 0, 8) . '.json';
75
+            $exceptionHash = md5($throwable->getFile().$throwable->getLine().$throwable->getCode());
76
+            $path = $dumpPath.'/'.microtime(true).'.'.substr($exceptionHash, 0, 8).'.json';
77 77
             FileSystem::make($dumpPath);
78 78
             FileSystem::put($path, json_encode(
79 79
                 new DebugObject($dumper),
Please login to merge, or discard this patch.
suda/src/application/loader/ApplicationBaseLoader.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     public function loadVendorIfExist()
28 28
     {
29
-        $vendorAutoload = $this->application->getPath() . '/vendor/autoload.php';
29
+        $vendorAutoload = $this->application->getPath().'/vendor/autoload.php';
30 30
         if (FileSystem::exist($vendorAutoload)) {
31 31
             Loader::requireOnce($vendorAutoload);
32 32
         }
Please login to merge, or discard this patch.
suda/src/application/ApplicationRoute.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
         $group = $group ?? $request->getAttribute('group');
58 58
         $default = $default ?? $request->getAttribute('module');
59 59
         $url = $this->route->create($this->getRouteName($name, $default, $group), $parameter, $allowQuery);
60
-        return $this->getUrlIndex($request) . ltrim($url, '/');
60
+        return $this->getUrlIndex($request).ltrim($url, '/');
61 61
     }
62 62
 
63 63
     /**
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     public function getUriBase(Request $request, bool $beautify = true): string
90 90
     {
91 91
         $index = $beautify ? $this->getUrlIndex($request) : $request->getIndex();
92
-        return $request->getUriBase() . $index;
92
+        return $request->getUriBase().$index;
93 93
     }
94 94
 
95 95
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      */
101 101
     protected function getRouteGroupPrefix(?string $group): string
102 102
     {
103
-        return $group === null || $group === 'default' ? '' : '@' . $group;
103
+        return $group === null || $group === 'default' ? '' : '@'.$group;
104 104
     }
105 105
 
106 106
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
         }
139 139
         $prefixGroup = $this->getRouteGroupPrefix($group);
140 140
         if ($module !== null && ($moduleObj = $this->find($module))) {
141
-            return $moduleObj->getFullName() . $prefixGroup . ':' . $name;
141
+            return $moduleObj->getFullName().$prefixGroup.':'.$name;
142 142
         }
143 143
         return $name;
144 144
     }
Please login to merge, or discard this patch.
server.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -2,17 +2,17 @@
 block discarded – undo
2 2
 $host = $argv[1] ?? '127.0.0.1:9501';
3 3
 list($ip, $port) = explode(':', $host);
4 4
 
5
-defined('SUDA_APP') or define('SUDA_APP', __DIR__ . '/app');
6
-defined('SUDA_DATA') or define('SUDA_DATA', __DIR__ . '/data');
7
-defined('SUDA_SYSTEM') or define('SUDA_SYSTEM', __DIR__ . '/suda');
5
+defined('SUDA_APP') or define('SUDA_APP', __DIR__.'/app');
6
+defined('SUDA_DATA') or define('SUDA_DATA', __DIR__.'/data');
7
+defined('SUDA_SYSTEM') or define('SUDA_SYSTEM', __DIR__.'/suda');
8 8
 defined('SUDA_PUBLIC') or define('SUDA_PUBLIC', __DIR__);
9 9
 defined('SUDA_DEBUG') or define('SUDA_DEBUG', true);
10 10
 defined('SUDA_DEBUG_LEVEL') or define('SUDA_DEBUG_LEVEL', 'debug');
11
-defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP . '/manifest');
12
-defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', SUDA_DATA . '/logs');
11
+defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP.'/manifest');
12
+defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', SUDA_DATA.'/logs');
13 13
 // 设置IP或者端口
14 14
 defined('SUDA_SWOOLE_IP') or define('SUDA_SWOOLE_IP', $ip);
15 15
 defined('SUDA_SWOOLE_PORT') or define('SUDA_SWOOLE_PORT', $port);
16 16
 
17
-require_once __DIR__ . '/vendor/autoload.php';
18
-require_once SUDA_SYSTEM . '/loader/swoole.php';
19 17
\ No newline at end of file
18
+require_once __DIR__.'/vendor/autoload.php';
19
+require_once SUDA_SYSTEM.'/loader/swoole.php';
20 20
\ No newline at end of file
Please login to merge, or discard this patch.
console.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ . '/vendor/autoload.php';
2
+require_once __DIR__.'/vendor/autoload.php';
3 3
 
4 4
 use suda\framework\Config;
5 5
 use suda\application\Module;
@@ -12,21 +12,21 @@  discard block
 block discarded – undo
12 12
 use suda\application\builder\ApplicationBuilder;
13 13
 use suda\application\loader\ApplicationBaseLoader;
14 14
 
15
-defined('SUDA_APP') or define('SUDA_APP', __DIR__ . '/app');
16
-defined('SUDA_DATA') or define('SUDA_DATA', __DIR__ . '/data');
17
-defined('SUDA_SYSTEM') or define('SUDA_SYSTEM', __DIR__ . '/suda');
15
+defined('SUDA_APP') or define('SUDA_APP', __DIR__.'/app');
16
+defined('SUDA_DATA') or define('SUDA_DATA', __DIR__.'/data');
17
+defined('SUDA_SYSTEM') or define('SUDA_SYSTEM', __DIR__.'/suda');
18 18
 defined('SUDA_PUBLIC') or define('SUDA_PUBLIC', __DIR__);
19 19
 defined('SUDA_DEBUG') or define('SUDA_DEBUG', true);
20 20
 defined('SUDA_DEBUG_LEVEL') or define('SUDA_DEBUG_LEVEL', 'debug');
21
-defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP . '/manifest');
22
-defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', SUDA_DATA . '/logs');
21
+defined('SUDA_APP_MANIFEST') or define('SUDA_APP_MANIFEST', SUDA_APP.'/manifest');
22
+defined('SUDA_DEBUG_LOG_PATH') or define('SUDA_DEBUG_LOG_PATH', SUDA_DATA.'/logs');
23 23
 
24
-require_once SUDA_SYSTEM . '/loader/loader.php';
24
+require_once SUDA_SYSTEM.'/loader/loader.php';
25 25
 
26 26
 // 初始化系统加载器
27 27
 $loader = new Loader;
28 28
 $loader->register();
29
-$loader->addIncludePath(SUDA_SYSTEM . '/src', 'suda');
29
+$loader->addIncludePath(SUDA_SYSTEM.'/src', 'suda');
30 30
 // 初始化数据目录
31 31
 $manifestConfig = ApplicationBuilder::loadManifest(SUDA_APP, SUDA_APP_MANIFEST);
32 32
 
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
     [
41 41
         'log-level' => SUDA_DEBUG_LEVEL,
42 42
         'save-path' => SUDA_DEBUG_LOG_PATH,
43
-        'save-dump-path' => SUDA_DEBUG_LOG_PATH . '/dump',
44
-        'save-zip-path' => SUDA_DEBUG_LOG_PATH . '/zip',
43
+        'save-dump-path' => SUDA_DEBUG_LOG_PATH.'/dump',
44
+        'save-zip-path' => SUDA_DEBUG_LOG_PATH.'/zip',
45 45
         'log-format' => '%message%',
46 46
     ]
47 47
 );
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
                 /** @var Command $cmd */
67 67
                 $className = Loader::realName($item['class']);
68 68
                 $cmd = new $className;
69
-                $cmd->setName($module->getName() . ':' . $cmd->getName());
69
+                $cmd->setName($module->getName().':'.$cmd->getName());
70 70
                 $app->add($cmd);
71 71
             }
72 72
         }
Please login to merge, or discard this patch.
suda/src/application/ApplicationModule.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -267,7 +267,7 @@
 block discarded – undo
267 267
             $module = $default;
268 268
         }
269 269
         if ($module !== null && ($moduleObj = $this->find($module))) {
270
-            return $moduleObj->getFullName() . ':' . $name;
270
+            return $moduleObj->getFullName().':'.$name;
271 271
         }
272 272
         return $name;
273 273
     }
Please login to merge, or discard this patch.
suda/src/application/loader/ApplicationLoader.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         foreach ($this->application->getModules() as $name => $module) {
50 50
             if ($module->getStatus() === Module::REACHABLE) {
51 51
                 $this->loadModuleRoute($module);
52
-                $this->application->debug()->debug('reachable # ' . $module->getFullName());
52
+                $this->application->debug()->debug('reachable # '.$module->getFullName());
53 53
             }
54 54
         }
55 55
     }
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
      */
84 84
     protected function loadRouteGroup(Module $module, string $groupName)
85 85
     {
86
-        $group = $groupName === 'default' ? '' : '-' . $groupName;
87
-        if ($path = $module->getResource()->getConfigResourcePath('config/route' . $group)) {
86
+        $group = $groupName === 'default' ? '' : '-'.$groupName;
87
+        if ($path = $module->getResource()->getConfigResourcePath('config/route'.$group)) {
88 88
             $routeConfig = Config::loadConfig($path, [
89 89
                 'module' => $module->getName(),
90 90
                 'group' => $groupName,
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                 'config' => $module->getConfig(),
93 93
             ]);
94 94
             if ($routeConfig !== null) {
95
-                $prefix = $module->getConfig('route-prefix.' . $groupName, '');
95
+                $prefix = $module->getConfig('route-prefix.'.$groupName, '');
96 96
                 $this->loadRouteConfig($module, $prefix, $groupName, $routeConfig);
97 97
             }
98 98
         }
@@ -121,9 +121,9 @@  discard block
 block discarded – undo
121 121
             $uri = $config['uri'] ?? '/';
122 122
             $anti = array_key_exists('anti-prefix', $config) && $config['anti-prefix'];
123 123
             if ($anti) {
124
-                $uri = '/' . trim($uri, '/');
124
+                $uri = '/'.trim($uri, '/');
125 125
             } else {
126
-                $uri = '/' . trim($prefix . $uri, '/');
126
+                $uri = '/'.trim($prefix.$uri, '/');
127 127
             }
128 128
             $this->application->request($method, $exname, $uri, $attributes);
129 129
         }
Please login to merge, or discard this patch.
suda/src/application/loader/ModuleLoader.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     {
23 23
         $this->loadVendorIfExist();
24 24
         $this->loadShareLibrary();
25
-        $this->application->debug()->debug('loaded - ' . $this->module->getFullName());
25
+        $this->application->debug()->debug('loaded - '.$this->module->getFullName());
26 26
     }
27 27
 
28 28
     /**
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function toActive()
34 34
     {
35 35
         $this->loadConfig();
36
-        $this->application->debug()->debug('active = ' . $this->module->getFullName());
36
+        $this->application->debug()->debug('active = '.$this->module->getFullName());
37 37
     }
38 38
 
39 39
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
         $this->checkRequirements();
45 45
         $this->loadPrivateLibrary();
46 46
         $this->application->setRunning($this->module);
47
-        $this->application->debug()->debug('run + ' . $this->module->getFullName());
47
+        $this->application->debug()->debug('run + '.$this->module->getFullName());
48 48
     }
49 49
 
50 50
     /**
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function loadVendorIfExist()
93 93
     {
94
-        $vendorAutoload = $this->module->getPath() . '/vendor/autoload.php';
94
+        $vendorAutoload = $this->module->getPath().'/vendor/autoload.php';
95 95
         if (FileSystem::exist($vendorAutoload)) {
96 96
             Loader::requireOnce($vendorAutoload);
97 97
         }
Please login to merge, or discard this patch.