Completed
Pull Request — 6.0 (#1937)
by nhzex
05:59
created
src/think/response/Jsonp.php 1 patch
Spacing   +2 added lines, -2 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
 
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
                 throw new \InvalidArgumentException(json_last_error_msg());
59 59
             }
60 60
 
61
-            $data = $handler . '(' . $data . ');';
61
+            $data = $handler.'('.$data.');';
62 62
 
63 63
             return $data;
64 64
         } catch (\Exception $e) {
Please login to merge, or discard this patch.
src/think/event/HttpRun.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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\event;
14 14
 
Please login to merge, or discard this patch.
src/think/event/LogWrite.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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\event;
14 14
 
Please login to merge, or discard this patch.
src/think/event/AppInit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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\event;
14 14
 
Please login to merge, or discard this patch.
src/think/console/command/optimize/Schema.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -31,20 +31,20 @@  discard block
 block discarded – undo
31 31
     {
32 32
         $app = $input->getArgument('app');
33 33
 
34
-        if (empty($app) && !is_dir($this->app->getBasePath() . 'controller')) {
34
+        if (empty($app) && !is_dir($this->app->getBasePath().'controller')) {
35 35
             $output->writeln('<error>Miss app name!</error>');
36 36
             return false;
37 37
         }
38 38
 
39 39
         if ($app) {
40
-            $appPath   = $this->app->getBasePath() . $app . DIRECTORY_SEPARATOR;
41
-            $namespace = 'app\\' . $app;
40
+            $appPath   = $this->app->getBasePath().$app.DIRECTORY_SEPARATOR;
41
+            $namespace = 'app\\'.$app;
42 42
         } else {
43 43
             $appPath   = $this->app->getBasePath();
44 44
             $namespace = 'app';
45 45
         }
46 46
 
47
-        $schemaPath = $this->app->getRootPath() . 'runtime' . DIRECTORY_SEPARATOR . 'schema' . DIRECTORY_SEPARATOR;
47
+        $schemaPath = $this->app->getRootPath().'runtime'.DIRECTORY_SEPARATOR.'schema'.DIRECTORY_SEPARATOR;
48 48
         if (!is_dir($schemaPath)) {
49 49
             mkdir($schemaPath, 0755, true);
50 50
         }
@@ -61,14 +61,14 @@  discard block
 block discarded – undo
61 61
             $tables = $this->app->db->getConnection()->getTables($dbName);
62 62
         } else {
63 63
 
64
-            $path = $appPath . 'model';
64
+            $path = $appPath.'model';
65 65
             $list = is_dir($path) ? scandir($path) : [];
66 66
 
67 67
             foreach ($list as $file) {
68 68
                 if (0 === strpos($file, '.')) {
69 69
                     continue;
70 70
                 }
71
-                $class = '\\' . $namespace . '\\model\\' . pathinfo($file, PATHINFO_FILENAME);
71
+                $class = '\\'.$namespace.'\\model\\'.pathinfo($file, PATHINFO_FILENAME);
72 72
                 $this->buildModelSchema($schemaPath, $class);
73 73
             }
74 74
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
             return;
77 77
         }
78 78
 
79
-        $db = isset($dbName) ? $dbName . '.' : '';
79
+        $db = isset($dbName) ? $dbName.'.' : '';
80 80
         $this->buildDataBaseSchema($schemaPath, $tables, $db);
81 81
 
82 82
         $output->writeln('<info>Succeed!</info>');
@@ -92,27 +92,27 @@  discard block
 block discarded – undo
92 92
 
93 93
             $table   = $model->getTable();
94 94
             $dbName  = $model->getConnection()->getConfig('database');
95
-            $content = '<?php ' . PHP_EOL . 'return ';
95
+            $content = '<?php '.PHP_EOL.'return ';
96 96
             $info    = $model->db()->getConnection()->getFields($table);
97
-            $content .= var_export($info, true) . ';';
97
+            $content .= var_export($info, true).';';
98 98
 
99
-            file_put_contents($path . $dbName . '.' . $table . '.php', $content);
99
+            file_put_contents($path.$dbName.'.'.$table.'.php', $content);
100 100
         }
101 101
     }
102 102
 
103 103
     protected function buildDataBaseSchema(string $path, array $tables, string $db): void
104 104
     {
105 105
         if ('' == $db) {
106
-            $dbName = $this->app->db->getConnection()->getConfig('database') . '.';
106
+            $dbName = $this->app->db->getConnection()->getConfig('database').'.';
107 107
         } else {
108 108
             $dbName = $db;
109 109
         }
110 110
 
111 111
         foreach ($tables as $table) {
112
-            $content = '<?php ' . PHP_EOL . 'return ';
113
-            $info    = $this->app->db->getConnection()->getFields($db . $table);
114
-            $content .= var_export($info, true) . ';';
115
-            file_put_contents($path . $dbName . $table . '.php', $content);
112
+            $content = '<?php '.PHP_EOL.'return ';
113
+            $info    = $this->app->db->getConnection()->getFields($db.$table);
114
+            $content .= var_export($info, true).';';
115
+            file_put_contents($path.$dbName.$table.'.php', $content);
116 116
         }
117 117
     }
118 118
 }
Please login to merge, or discard this patch.
src/think/exception/FileException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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
 
Please login to merge, or discard this patch.
src/think/exception/ValidateException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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
 
Please login to merge, or discard this patch.
src/think/exception/HttpResponseException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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
 
Please login to merge, or discard this patch.
src/think/exception/HttpException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 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
 
Please login to merge, or discard this patch.