Completed
Push — 6.0 ( 5b460f...b0d573 )
by liu
06:02
created
src/think/console/command/optimize/Route.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,9 +29,9 @@  discard block
 block discarded – undo
29 29
     {
30 30
         $dir = $input->getArgument('dir') ?: '';
31 31
 
32
-        $path = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($dir ? $dir . DIRECTORY_SEPARATOR : '');
32
+        $path = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.($dir ? $dir.DIRECTORY_SEPARATOR : '');
33 33
 
34
-        $filename = $path . 'route.php';
34
+        $filename = $path.'route.php';
35 35
         if (is_file($filename)) {
36 36
             unlink($filename);
37 37
         }
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
         $this->app->route->lazy(false);
47 47
 
48 48
         // 路由检测
49
-        $path = $this->app->getRootPath() . ($dir ? 'app' . DIRECTORY_SEPARATOR . $dir . DIRECTORY_SEPARATOR : '') . 'route' . DIRECTORY_SEPARATOR ;
49
+        $path = $this->app->getRootPath().($dir ? 'app'.DIRECTORY_SEPARATOR.$dir.DIRECTORY_SEPARATOR : '').'route'.DIRECTORY_SEPARATOR;
50 50
 
51 51
         $files = is_dir($path) ? scandir($path) : [];
52 52
 
53 53
         foreach ($files as $file) {
54 54
             if (strpos($file, '.php')) {
55
-                include $path . $file;
55
+                include $path.$file;
56 56
             }
57 57
         }
58 58
 
59 59
         //触发路由载入完成事件
60 60
         $this->app->event->trigger(RouteLoaded::class);
61 61
 
62
-        $content = '<?php ' . PHP_EOL . 'return ';
63
-        $content .= '\Opis\Closure\unserialize(\'' . \Opis\Closure\serialize($this->app->route->getName()) . '\');';
62
+        $content = '<?php '.PHP_EOL.'return ';
63
+        $content .= '\Opis\Closure\unserialize(\''.\Opis\Closure\serialize($this->app->route->getName()).'\');';
64 64
         return $content;
65 65
     }
66 66
 
Please login to merge, or discard this patch.
src/think/exception/Handle.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: yunwuxin <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think\exception;
14 14
 
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             }
73 73
 
74 74
             if ($this->app->config->get('log.record_trace')) {
75
-                $log .= PHP_EOL . $exception->getTraceAsString();
75
+                $log .= PHP_EOL.$exception->getTraceAsString();
76 76
             }
77 77
 
78 78
             try {
79 79
                 $this->app->log->record($log, 'error');
80
-            } catch (Exception $e){}
80
+            } catch (Exception $e) {}
81 81
         }
82 82
     }
83 83
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
         ob_start();
224 224
         $data = $this->convertExceptionToArray($exception);
225 225
         extract($data);
226
-        include $this->app->config->get('app.exception_tmpl') ?: __DIR__ . '/../../tpl/think_exception.tpl';
226
+        include $this->app->config->get('app.exception_tmpl') ?: __DIR__.'/../../tpl/think_exception.tpl';
227 227
 
228 228
         return ob_get_clean();
229 229
     }
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
 
266 266
         if (strpos($message, ':')) {
267 267
             $name    = strstr($message, ':', true);
268
-            $message = $lang->has($name) ? $lang->get($name) . strstr($message, ':') : $message;
268
+            $message = $lang->has($name) ? $lang->get($name).strstr($message, ':') : $message;
269 269
         } elseif (strpos($message, ',')) {
270 270
             $name    = strstr($message, ',', true);
271
-            $message = $lang->has($name) ? $lang->get($name) . ':' . substr(strstr($message, ','), 1) : $message;
271
+            $message = $lang->has($name) ? $lang->get($name).':'.substr(strstr($message, ','), 1) : $message;
272 272
         } elseif ($lang->has($message)) {
273 273
             $message = $lang->get($message);
274 274
         }
Please login to merge, or discard this patch.
src/think/route/dispatch/Controller.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: liu21st <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think\route\dispatch;
14 14
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         if (strpos($controller, '.')) {
55 55
             $pos              = strrpos($controller, '.');
56
-            $this->controller = substr($controller, 0, $pos) . '.' . Str::studly(substr($controller, $pos + 1));
56
+            $this->controller = substr($controller, 0, $pos).'.'.Str::studly(substr($controller, $pos + 1));
57 57
         } else {
58 58
             $this->controller = Str::studly($controller);
59 59
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             // 实例化控制器
74 74
             $instance = $this->controller($this->controller);
75 75
         } catch (ClassNotFoundException $e) {
76
-            throw new HttpException(404, 'controller not exists:' . $e->getClass());
76
+            throw new HttpException(404, 'controller not exists:'.$e->getClass());
77 77
         }
78 78
 
79 79
         // 注册控制器中间件
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 
82 82
         return $this->app->middleware->pipeline('controller')
83 83
             ->send($this->request)
84
-            ->then(function () use ($instance) {
84
+            ->then(function() use ($instance) {
85 85
                 // 获取当前操作名
86 86
                 $suffix = $this->rule->config('action_suffix');
87
-                $action = $this->actionName . $suffix;
87
+                $action = $this->actionName.$suffix;
88 88
 
89 89
                 if (is_callable([$instance, $action])) {
90 90
                     $vars = $this->request->param();
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
                     }
105 105
                 } else {
106 106
                     // 操作不存在
107
-                    throw new HttpException(404, 'method not exists:' . get_class($instance) . '->' . $action . '()');
107
+                    throw new HttpException(404, 'method not exists:'.get_class($instance).'->'.$action.'()');
108 108
                 }
109 109
 
110 110
                 $data = $this->app->invokeReflectMethod($instance, $reflect, $vars);
@@ -131,11 +131,11 @@  discard block
 block discarded – undo
131 131
 
132 132
             foreach ($middlewares as $key => $val) {
133 133
                 if (!is_int($key)) {
134
-                    if (isset($val['only']) && !in_array($this->request->action(true), array_map(function ($item) {
134
+                    if (isset($val['only']) && !in_array($this->request->action(true), array_map(function($item) {
135 135
                         return strtolower($item);
136 136
                     }, is_string($val['only']) ? explode(",", $val['only']) : $val['only']))) {
137 137
                         continue;
138
-                    } elseif (isset($val['except']) && in_array($this->request->action(true), array_map(function ($item) {
138
+                    } elseif (isset($val['except']) && in_array($this->request->action(true), array_map(function($item) {
139 139
                         return strtolower($item);
140 140
                     }, is_string($val['except']) ? explode(',', $val['except']) : $val['except']))) {
141 141
                         continue;
@@ -167,14 +167,14 @@  discard block
 block discarded – undo
167 167
         $controllerLayer = $this->rule->config('controller_layer') ?: 'controller';
168 168
         $emptyController = $this->rule->config('empty_controller') ?: 'Error';
169 169
 
170
-        $class = $this->app->parseClass($controllerLayer, $name . $suffix);
170
+        $class = $this->app->parseClass($controllerLayer, $name.$suffix);
171 171
 
172 172
         if (class_exists($class)) {
173 173
             return $this->app->make($class, [], true);
174
-        } elseif ($emptyController && class_exists($emptyClass = $this->app->parseClass($controllerLayer, $emptyController . $suffix))) {
174
+        } elseif ($emptyController && class_exists($emptyClass = $this->app->parseClass($controllerLayer, $emptyController.$suffix))) {
175 175
             return $this->app->make($emptyClass, [], true);
176 176
         }
177 177
 
178
-        throw new ClassNotFoundException('class not exists:' . $class, $class);
178
+        throw new ClassNotFoundException('class not exists:'.$class, $class);
179 179
     }
180 180
 }
Please login to merge, or discard this patch.
src/think/Middleware.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: Slince <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think;
14 14
 
@@ -133,8 +133,8 @@  discard block
 block discarded – undo
133 133
     public function pipeline(string $type = 'global')
134 134
     {
135 135
         return (new Pipeline())
136
-            ->through(array_map(function ($middleware) {
137
-                return function ($request, $next) use ($middleware) {
136
+            ->through(array_map(function($middleware) {
137
+                return function($request, $next) use ($middleware) {
138 138
                     [$call, $params] = $middleware;
139 139
                     if (is_array($call) && is_string($call[0])) {
140 140
                         $call = [$this->app->make($call[0]), $call[1]];
@@ -229,7 +229,7 @@  discard block
 block discarded – undo
229 229
     protected function sortMiddleware(array $middlewares)
230 230
     {
231 231
         $priority = $this->app->config->get('middleware.priority', []);
232
-        uasort($middlewares, function ($a, $b) use ($priority) {
232
+        uasort($middlewares, function($a, $b) use ($priority) {
233 233
             $aPriority = $this->getMiddlewarePriority($priority, $a);
234 234
             $bPriority = $this->getMiddlewarePriority($priority, $b);
235 235
             return $bPriority - $aPriority;
Please login to merge, or discard this patch.
src/think/session/Store.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      */
119 119
     public function setId($id = null): void
120 120
     {
121
-        $this->id = is_string($id) && strlen($id) === 32 && ctype_alnum($id) ? $id : md5(microtime(true) . session_create_id());
121
+        $this->id = is_string($id) && strlen($id) === 32 && ctype_alnum($id) ? $id : md5(microtime(true).session_create_id());
122 122
     }
123 123
 
124 124
     /**
Please login to merge, or discard this patch.
src/think/log/driver/Socket.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: luofei614 <weibo.com/luofei614>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think\log\driver;
14 14
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             if ($this->app->exists('request')) {
93 93
                 $currentUri = $this->app->request->url(true);
94 94
             } else {
95
-                $currentUri = 'cmd:' . implode(' ', $_SERVER['argv'] ?? []);
95
+                $currentUri = 'cmd:'.implode(' ', $_SERVER['argv'] ?? []);
96 96
             }
97 97
 
98 98
             if (!empty($this->config['format_head'])) {
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         foreach ($log as $type => $val) {
117 117
             $trace[] = [
118 118
                 'type' => isset($expandLevel[$type]) ? 'group' : 'groupCollapsed',
119
-                'msg'  => '[ ' . $type . ' ]',
119
+                'msg'  => '[ '.$type.' ]',
120 120
                 'css'  => $this->css[$type] ?? '',
121 121
             ];
122 122
 
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
         ];
203 203
 
204 204
         $msg     = json_encode($logs, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES | JSON_PARTIAL_OUTPUT_ON_ERROR);
205
-        $address = '/' . $clientId; //将client_id作为地址, server端通过地址判断将日志发布给谁
205
+        $address = '/'.$clientId; //将client_id作为地址, server端通过地址判断将日志发布给谁
206 206
 
207 207
         $this->send($this->config['host'], $this->config['port'], $msg, $address);
208 208
     }
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
      */
286 286
     protected function send($host, $port, $message = '', $address = '/')
287 287
     {
288
-        $url = 'http://' . $host . ':' . $port . $address;
288
+        $url = 'http://'.$host.':'.$port.$address;
289 289
         $ch  = curl_init();
290 290
 
291 291
         curl_setopt($ch, CURLOPT_URL, $url);
Please login to merge, or discard this patch.
src/think/response/File.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: liu21st <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think\response;
14 14
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     protected function output($data)
42 42
     {
43 43
         if (!$this->isContent && !is_file($data)) {
44
-            throw new Exception('file not exists:' . $data);
44
+            throw new Exception('file not exists:'.$data);
45 45
         }
46 46
 
47 47
         ob_end_clean();
@@ -62,13 +62,13 @@  discard block
 block discarded – undo
62 62
 
63 63
         $this->header['Pragma']                    = 'public';
64 64
         $this->header['Content-Type']              = $mimeType ?: 'application/octet-stream';
65
-        $this->header['Cache-control']             = 'max-age=' . $this->expire;
66
-        $this->header['Content-Disposition']       = ($this->isForceDownload ? 'attachment; ' : '') . 'filename="' . $name . '"';
65
+        $this->header['Cache-control']             = 'max-age='.$this->expire;
66
+        $this->header['Content-Disposition']       = ($this->isForceDownload ? 'attachment; ' : '').'filename="'.$name.'"';
67 67
         $this->header['Content-Length']            = $size;
68 68
         $this->header['Content-Transfer-Encoding'] = 'binary';
69
-        $this->header['Expires']                   = gmdate("D, d M Y H:i:s", time() + $this->expire) . ' GMT';
69
+        $this->header['Expires']                   = gmdate("D, d M Y H:i:s", time() + $this->expire).' GMT';
70 70
 
71
-        $this->lastModified(gmdate('D, d M Y H:i:s', time()) . ' GMT');
71
+        $this->lastModified(gmdate('D, d M Y H:i:s', time()).' GMT');
72 72
 
73 73
         return $this->isContent ? $data : file_get_contents($data);
74 74
     }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $this->name = $filename;
150 150
 
151 151
         if ($extension && false === strpos($filename, '.')) {
152
-            $this->name .= '.' . pathinfo($this->data, PATHINFO_EXTENSION);
152
+            $this->name .= '.'.pathinfo($this->data, PATHINFO_EXTENSION);
153 153
         }
154 154
 
155 155
         return $this;
Please login to merge, or discard this patch.
src/think/App.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 // +----------------------------------------------------------------------
9 9
 // | Author: liu21st <[email protected]>
10 10
 // +----------------------------------------------------------------------
11
-declare (strict_types = 1);
11
+declare(strict_types=1);
12 12
 
13 13
 namespace think;
14 14
 
@@ -162,13 +162,13 @@  discard block
 block discarded – undo
162 162
      */
163 163
     public function __construct(string $rootPath = '')
164 164
     {
165
-        $this->thinkPath   = dirname(__DIR__) . DIRECTORY_SEPARATOR;
166
-        $this->rootPath    = $rootPath ? rtrim($rootPath, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR : $this->getDefaultRootPath();
167
-        $this->appPath     = $this->rootPath . 'app' . DIRECTORY_SEPARATOR;
168
-        $this->runtimePath = $this->rootPath . 'runtime' . DIRECTORY_SEPARATOR;
165
+        $this->thinkPath   = dirname(__DIR__).DIRECTORY_SEPARATOR;
166
+        $this->rootPath    = $rootPath ? rtrim($rootPath, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR : $this->getDefaultRootPath();
167
+        $this->appPath     = $this->rootPath.'app'.DIRECTORY_SEPARATOR;
168
+        $this->runtimePath = $this->rootPath.'runtime'.DIRECTORY_SEPARATOR;
169 169
 
170
-        if (is_file($this->appPath . 'provider.php')) {
171
-            $this->bind(include $this->appPath . 'provider.php');
170
+        if (is_file($this->appPath.'provider.php')) {
171
+            $this->bind(include $this->appPath.'provider.php');
172 172
         }
173 173
 
174 174
         static::setInstance($this);
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     public function getService($service)
229 229
     {
230 230
         $name = is_string($service) ? $service : get_class($service);
231
-        return array_values(array_filter($this->services, function ($value) use ($name) {
231
+        return array_values(array_filter($this->services, function($value) use ($name) {
232 232
             return $value instanceof $name;
233 233
         }, ARRAY_FILTER_USE_BOTH))[0] ?? null;
234 234
     }
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     public function getBasePath(): string
306 306
     {
307
-        return $this->rootPath . 'app' . DIRECTORY_SEPARATOR;
307
+        return $this->rootPath.'app'.DIRECTORY_SEPARATOR;
308 308
     }
309 309
 
310 310
     /**
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
      */
363 363
     public function getConfigPath(): string
364 364
     {
365
-        return $this->rootPath . 'config' . DIRECTORY_SEPARATOR;
365
+        return $this->rootPath.'config'.DIRECTORY_SEPARATOR;
366 366
     }
367 367
 
368 368
     /**
@@ -408,8 +408,8 @@  discard block
 block discarded – undo
408 408
         $this->beginMem  = memory_get_usage();
409 409
 
410 410
         // 加载环境变量
411
-        if (is_file($this->rootPath . '.env')) {
412
-            $this->env->load($this->rootPath . '.env');
411
+        if (is_file($this->rootPath.'.env')) {
412
+            $this->env->load($this->rootPath.'.env');
413 413
         }
414 414
 
415 415
         $this->configExt = $this->env->get('config_ext', '.php');
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
         // 加载框架默认语言包
423 423
         $langSet = $this->lang->defaultLangSet();
424 424
 
425
-        $this->lang->load($this->thinkPath . 'lang' . DIRECTORY_SEPARATOR . $langSet . '.php');
425
+        $this->lang->load($this->thinkPath.'lang'.DIRECTORY_SEPARATOR.$langSet.'.php');
426 426
 
427 427
         // 加载应用默认语言包
428 428
         $this->loadLangPack($langSet);
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         }
462 462
 
463 463
         // 加载系统语言包
464
-        $files = glob($this->appPath . 'lang' . DIRECTORY_SEPARATOR . $langset . '.*');
464
+        $files = glob($this->appPath.'lang'.DIRECTORY_SEPARATOR.$langset.'.*');
465 465
         $this->lang->load($files);
466 466
 
467 467
         // 加载扩展(自定义)语言包
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
      */
480 480
     public function boot(): void
481 481
     {
482
-        array_walk($this->services, function ($service) {
482
+        array_walk($this->services, function($service) {
483 483
             $this->bootService($service);
484 484
         });
485 485
     }
@@ -493,30 +493,30 @@  discard block
 block discarded – undo
493 493
     {
494 494
         $appPath = $this->getAppPath();
495 495
 
496
-        if (is_file($appPath . 'common.php')) {
497
-            include_once $appPath . 'common.php';
496
+        if (is_file($appPath.'common.php')) {
497
+            include_once $appPath.'common.php';
498 498
         }
499 499
 
500
-        include_once $this->thinkPath . 'helper.php';
500
+        include_once $this->thinkPath.'helper.php';
501 501
 
502 502
         $configPath = $this->getConfigPath();
503 503
 
504 504
         $files = [];
505 505
 
506 506
         if (is_dir($configPath)) {
507
-            $files = glob($configPath . '*' . $this->configExt);
507
+            $files = glob($configPath.'*'.$this->configExt);
508 508
         }
509 509
 
510 510
         foreach ($files as $file) {
511 511
             $this->config->load($file, pathinfo($file, PATHINFO_FILENAME));
512 512
         }
513 513
 
514
-        if (is_file($appPath . 'event.php')) {
515
-            $this->loadEvent(include $appPath . 'event.php');
514
+        if (is_file($appPath.'event.php')) {
515
+            $this->loadEvent(include $appPath.'event.php');
516 516
         }
517 517
 
518
-        if (is_file($appPath . 'service.php')) {
519
-            $services = include $appPath . 'service.php';
518
+        if (is_file($appPath.'service.php')) {
519
+            $services = include $appPath.'service.php';
520 520
             foreach ($services as $service) {
521 521
                 $this->register($service);
522 522
             }
@@ -581,9 +581,9 @@  discard block
 block discarded – undo
581 581
         $name  = str_replace(['/', '.'], '\\', $name);
582 582
         $array = explode('\\', $name);
583 583
         $class = Str::studly(array_pop($array));
584
-        $path  = $array ? implode('\\', $array) . '\\' : '';
584
+        $path  = $array ? implode('\\', $array).'\\' : '';
585 585
 
586
-        return $this->namespace . '\\' . $layer . '\\' . $path . $class;
586
+        return $this->namespace.'\\'.$layer.'\\'.$path.$class;
587 587
     }
588 588
 
589 589
     /**
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     protected function getDefaultRootPath(): string
604 604
     {
605
-        return dirname($this->thinkPath, 4) . DIRECTORY_SEPARATOR;
605
+        return dirname($this->thinkPath, 4).DIRECTORY_SEPARATOR;
606 606
     }
607 607
 
608 608
 }
Please login to merge, or discard this patch.
src/think/console/command/Clear.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -30,18 +30,18 @@  discard block
 block discarded – undo
30 30
 
31 31
     protected function execute(Input $input, Output $output)
32 32
     {
33
-        $runtimePath = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR;
33
+        $runtimePath = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR;
34 34
 
35 35
         if ($input->getOption('cache')) {
36
-            $path = $runtimePath . 'cache';
36
+            $path = $runtimePath.'cache';
37 37
         } elseif ($input->getOption('log')) {
38
-            $path = $runtimePath . 'log';
38
+            $path = $runtimePath.'log';
39 39
         } else {
40 40
             $path = $input->getOption('path') ?: $runtimePath;
41 41
         }
42 42
 
43 43
         $rmdir = $input->getOption('dir') ? true : false;
44
-        $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir);
44
+        $this->clear(rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR, $rmdir);
45 45
 
46 46
         $output->writeln("<info>Clear Successed</info>");
47 47
     }
@@ -51,13 +51,13 @@  discard block
 block discarded – undo
51 51
         $files = is_dir($path) ? scandir($path) : [];
52 52
 
53 53
         foreach ($files as $file) {
54
-            if ('.' != $file && '..' != $file && is_dir($path . $file)) {
55
-                $this->clear($path . $file . DIRECTORY_SEPARATOR, $rmdir);
54
+            if ('.' != $file && '..' != $file && is_dir($path.$file)) {
55
+                $this->clear($path.$file.DIRECTORY_SEPARATOR, $rmdir);
56 56
                 if ($rmdir) {
57
-                    rmdir($path . $file);
57
+                    rmdir($path.$file);
58 58
                 }
59
-            } elseif ('.gitignore' != $file && is_file($path . $file)) {
60
-                unlink($path . $file);
59
+            } elseif ('.gitignore' != $file && is_file($path.$file)) {
60
+                unlink($path.$file);
61 61
             }
62 62
         }
63 63
     }
Please login to merge, or discard this patch.