Completed
Pull Request — 6.0 (#2225)
by
unknown
06:16
created
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.