Completed
Push — 6.0 ( 594042...dcc589 )
by yun
04:09
created
src/think/console/command/RouteList.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,15 +42,15 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $app = $input->getArgument('app');
44 44
 
45
-        if (empty($app) && !is_dir($this->app->getBasePath() . 'controller')) {
45
+        if (empty($app) && !is_dir($this->app->getBasePath().'controller')) {
46 46
             $output->writeln('<error>Miss app name!</error>');
47 47
             return false;
48 48
         }
49 49
 
50 50
         if ($app) {
51
-            $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR . 'route_list_' . $app . '.php';
51
+            $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR.'route_list_'.$app.'.php';
52 52
         } else {
53
-            $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'route_list.php';
53
+            $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.'route_list.php';
54 54
         }
55 55
 
56 56
         if (is_file($filename)) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         }
61 61
 
62 62
         $content = $this->getRouteList($app);
63
-        file_put_contents($filename, 'Route List' . PHP_EOL . $content);
63
+        file_put_contents($filename, 'Route List'.PHP_EOL.$content);
64 64
     }
65 65
 
66 66
     protected function getRouteList(string $app = null): string
@@ -69,16 +69,16 @@  discard block
 block discarded – undo
69 69
         $this->app->route->clear();
70 70
 
71 71
         if ($app) {
72
-            $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR;
72
+            $path = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR;
73 73
         } else {
74
-            $path = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR;
74
+            $path = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR;
75 75
         }
76 76
 
77 77
         $files = is_dir($path) ? scandir($path) : [];
78 78
 
79 79
         foreach ($files as $file) {
80 80
             if (strpos($file, '.php')) {
81
-                include $path . $file;
81
+                include $path.$file;
82 82
             }
83 83
         }
84 84
 
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
                 $sort = $this->sortBy[$sort];
118 118
             }
119 119
 
120
-            uasort($rows, function ($a, $b) use ($sort) {
120
+            uasort($rows, function($a, $b) use ($sort) {
121 121
                 $itemA = $a[$sort] ?? null;
122 122
                 $itemB = $b[$sort] ?? null;
123 123
 
Please login to merge, or discard this patch.
src/think/Service.php 1 patch
Spacing   +3 added lines, -3 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;
14 14
 
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
      */
37 37
     protected function loadRoutesFrom($path)
38 38
     {
39
-        $this->registerRoutes(function () use ($path) {
39
+        $this->registerRoutes(function() use ($path) {
40 40
             include $path;
41 41
         });
42 42
     }
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     {
60 60
         $commands = is_array($commands) ? $commands : func_get_args();
61 61
 
62
-        Console::starting(function (Console $console) use ($commands) {
62
+        Console::starting(function(Console $console) use ($commands) {
63 63
             $console->addCommands($commands);
64 64
         });
65 65
     }
Please login to merge, or discard this patch.