Completed
Push — 6.0 ( 487697...a3b118 )
by yun
08:06
created
src/think/console/command/make/Command.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $commandName = $this->input->getArgument('commandName') ?: strtolower(basename($name));
32 32
         $namespace   = trim(implode('\\', array_slice(explode('\\', $name), 0, -1)), '\\');
33 33
 
34
-        $class = str_replace($namespace . '\\', '', $name);
34
+        $class = str_replace($namespace.'\\', '', $name);
35 35
         $stub  = file_get_contents($this->getStub());
36 36
 
37 37
         return str_replace(['{%commandName%}', '{%className%}', '{%namespace%}', '{%app_namespace%}'], [
@@ -44,12 +44,12 @@  discard block
 block discarded – undo
44 44
 
45 45
     protected function getStub(): string
46 46
     {
47
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'command.stub';
47
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'command.stub';
48 48
     }
49 49
 
50 50
     protected function getNamespace(string $app): string
51 51
     {
52
-        return parent::getNamespace($app) . '\\command';
52
+        return parent::getNamespace($app).'\\command';
53 53
     }
54 54
 
55 55
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Listener.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 
26 26
     protected function getStub(): string
27 27
     {
28
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'listener.stub';
28
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'listener.stub';
29 29
     }
30 30
 
31 31
     protected function getNamespace(string $app): string
32 32
     {
33
-        return parent::getNamespace($app) . '\\listener';
33
+        return parent::getNamespace($app).'\\listener';
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
     protected function getStub(): string
28 28
     {
29
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'model.stub';
29
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'model.stub';
30 30
     }
31 31
 
32 32
     protected function getNamespace(string $app): string
33 33
     {
34
-        return parent::getNamespace($app) . '\\model';
34
+        return parent::getNamespace($app).'\\model';
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Service.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,11 +26,11 @@
 block discarded – undo
26 26
 
27 27
     protected function getStub(): string
28 28
     {
29
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'service.stub';
29
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'service.stub';
30 30
     }
31 31
 
32 32
     protected function getNamespace(string $app): string
33 33
     {
34
-        return parent::getNamespace($app) . '\\service';
34
+        return parent::getNamespace($app).'\\service';
35 35
     }
36 36
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Middleware.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
     protected function getStub(): string
28 28
     {
29
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'middleware.stub';
29
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'middleware.stub';
30 30
     }
31 31
 
32 32
     protected function getNamespace(string $app): string
Please login to merge, or discard this patch.
src/think/console/command/make/Subscribe.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 
26 26
     protected function getStub(): string
27 27
     {
28
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'subscribe.stub';
28
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'subscribe.stub';
29 29
     }
30 30
 
31 31
     protected function getNamespace(string $app): string
32 32
     {
33
-        return parent::getNamespace($app) . '\\subscribe';
33
+        return parent::getNamespace($app).'\\subscribe';
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Event.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
 
26 26
     protected function getStub(): string
27 27
     {
28
-        return __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR . 'event.stub';
28
+        return __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR.'event.stub';
29 29
     }
30 30
 
31 31
     protected function getNamespace(string $app): string
32 32
     {
33
-        return parent::getNamespace($app) . '\\event';
33
+        return parent::getNamespace($app).'\\event';
34 34
     }
35 35
 }
Please login to merge, or discard this patch.
src/think/console/command/make/Controller.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -30,27 +30,27 @@
 block discarded – undo
30 30
 
31 31
     protected function getStub(): string
32 32
     {
33
-        $stubPath = __DIR__ . DIRECTORY_SEPARATOR . 'stubs' . DIRECTORY_SEPARATOR;
33
+        $stubPath = __DIR__.DIRECTORY_SEPARATOR.'stubs'.DIRECTORY_SEPARATOR;
34 34
 
35 35
         if ($this->input->getOption('api')) {
36
-            return $stubPath . 'controller.api.stub';
36
+            return $stubPath.'controller.api.stub';
37 37
         }
38 38
 
39 39
         if ($this->input->getOption('plain')) {
40
-            return $stubPath . 'controller.plain.stub';
40
+            return $stubPath.'controller.plain.stub';
41 41
         }
42 42
 
43
-        return $stubPath . 'controller.stub';
43
+        return $stubPath.'controller.stub';
44 44
     }
45 45
 
46 46
     protected function getClassName(string $name): string
47 47
     {
48
-        return parent::getClassName($name) . ($this->app->config->get('route.controller_suffix') ? 'Controller' : '');
48
+        return parent::getClassName($name).($this->app->config->get('route.controller_suffix') ? 'Controller' : '');
49 49
     }
50 50
 
51 51
     protected function getNamespace(string $app): string
52 52
     {
53
-        return parent::getNamespace($app) . '\\controller';
53
+        return parent::getNamespace($app).'\\controller';
54 54
     }
55 55
 
56 56
 }
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
@@ -38,18 +38,18 @@  discard block
 block discarded – undo
38 38
             $this->app->cache->clear('route_cache');
39 39
         } else {
40 40
             $app         = $input->getArgument('app');
41
-            $runtimePath = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . ($app ? $app . DIRECTORY_SEPARATOR : '');
41
+            $runtimePath = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.($app ? $app.DIRECTORY_SEPARATOR : '');
42 42
 
43 43
             if ($input->getOption('cache')) {
44
-                $path = $runtimePath . 'cache';
44
+                $path = $runtimePath.'cache';
45 45
             } elseif ($input->getOption('log')) {
46
-                $path = $runtimePath . 'log';
46
+                $path = $runtimePath.'log';
47 47
             } else {
48 48
                 $path = $input->getOption('path') ?: $runtimePath;
49 49
             }
50 50
 
51 51
             $rmdir = $input->getOption('dir') ? true : false;
52
-            $this->clear(rtrim($path, DIRECTORY_SEPARATOR) . DIRECTORY_SEPARATOR, $rmdir);
52
+            $this->clear(rtrim($path, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR, $rmdir);
53 53
         }
54 54
 
55 55
         $output->writeln("<info>Clear Successed</info>");
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
         $files = is_dir($path) ? scandir($path) : [];
61 61
 
62 62
         foreach ($files as $file) {
63
-            if ('.' != $file && '..' != $file && is_dir($path . $file)) {
64
-                array_map('unlink', glob($path . $file . DIRECTORY_SEPARATOR . '*.*'));
63
+            if ('.' != $file && '..' != $file && is_dir($path.$file)) {
64
+                array_map('unlink', glob($path.$file.DIRECTORY_SEPARATOR.'*.*'));
65 65
                 if ($rmdir) {
66
-                    rmdir($path . $file);
66
+                    rmdir($path.$file);
67 67
                 }
68
-            } elseif ('.gitignore' != $file && is_file($path . $file)) {
69
-                unlink($path . $file);
68
+            } elseif ('.gitignore' != $file && is_file($path.$file)) {
69
+                unlink($path.$file);
70 70
             }
71 71
         }
72 72
     }
Please login to merge, or discard this patch.