Completed
Push — 6.0 ( 4b2d81...f54ee3 )
by liu
05:35
created
src/think/console/command/RouteList.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
         $app = $input->getArgument('app');
44 44
 
45 45
         if ($app) {
46
-            $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . $app . DIRECTORY_SEPARATOR . 'route_list.php';
46
+            $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.$app.DIRECTORY_SEPARATOR.'route_list.php';
47 47
         } else {
48
-            $filename = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'route_list.php';
48
+            $filename = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.'route_list.php';
49 49
         }
50 50
 
51 51
         if (is_file($filename)) {
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
         }
56 56
 
57 57
         $content = $this->getRouteList($app);
58
-        file_put_contents($filename, 'Route List' . PHP_EOL . $content);
58
+        file_put_contents($filename, 'Route List'.PHP_EOL.$content);
59 59
     }
60 60
 
61 61
     protected function getRouteList(string $app = null): string
@@ -64,12 +64,12 @@  discard block
 block discarded – undo
64 64
         $this->app->route->clear();
65 65
 
66 66
         if ($app && $this->isMultiApp()) {
67
-            $file = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR . $app . '.php';
67
+            $file = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR.$app.'.php';
68 68
             if (is_file($file)) {
69 69
                 include $file;
70 70
             }
71 71
         } else {
72
-            $path  = $this->app->getRootPath() . 'route' . DIRECTORY_SEPARATOR;
72
+            $path  = $this->app->getRootPath().'route'.DIRECTORY_SEPARATOR;
73 73
             $files = is_dir($path) ? scandir($path) : [];
74 74
 
75 75
             foreach ($files as $file) {
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     if ($this->isMultiApp()) {
78 78
                         $this->app->route->setAppName(pathinfo($file, PATHINFO_FILENAME));
79 79
                     }
80
-                    include $path . $file;
80
+                    include $path.$file;
81 81
                 }
82 82
             }
83 83
         }
@@ -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.