Passed
Pull Request — 6.0 (#2239)
by yun
12:47 queued 06:07
created
src/think/exception/Handle.php 1 patch
Spacing   +5 added lines, -5 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\exception;
14 14
 
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             }
73 73
 
74 74
             if ($this->app->config->get('log.record_trace')) {
75
-                $log .= PHP_EOL . $exception->getTraceAsString();
75
+                $log .= PHP_EOL.$exception->getTraceAsString();
76 76
             }
77 77
 
78 78
             try {
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
         ob_start();
225 225
         $data = $this->convertExceptionToArray($exception);
226 226
         extract($data);
227
-        include $this->app->config->get('app.exception_tmpl') ?: __DIR__ . '/../../tpl/think_exception.tpl';
227
+        include $this->app->config->get('app.exception_tmpl') ?: __DIR__.'/../../tpl/think_exception.tpl';
228 228
 
229 229
         return ob_get_clean();
230 230
     }
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
 
267 267
         if (strpos($message, ':')) {
268 268
             $name    = strstr($message, ':', true);
269
-            $message = $lang->has($name) ? $lang->get($name) . strstr($message, ':') : $message;
269
+            $message = $lang->has($name) ? $lang->get($name).strstr($message, ':') : $message;
270 270
         } elseif (strpos($message, ',')) {
271 271
             $name    = strstr($message, ',', true);
272
-            $message = $lang->has($name) ? $lang->get($name) . ':' . substr(strstr($message, ','), 1) : $message;
272
+            $message = $lang->has($name) ? $lang->get($name).':'.substr(strstr($message, ','), 1) : $message;
273 273
         } elseif ($lang->has($message)) {
274 274
             $message = $lang->get($message);
275 275
         }
Please login to merge, or discard this patch.
src/think/exception/InvalidArgumentException.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
 namespace think\exception;
13 13
 
14 14
 use Psr\Cache\InvalidArgumentException as Psr6CacheInvalidArgumentInterface;
Please login to merge, or discard this patch.
src/think/exception/ErrorException.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: 麦当苗儿 <[email protected]> <http://zjzit.cn>
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/File.php 1 patch
Spacing   +6 added lines, -6 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;
14 14
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     {
98 98
         $target = $this->getTargetFile($directory, $name);
99 99
 
100
-        set_error_handler(function ($type, $msg) use (&$error) {
100
+        set_error_handler(function($type, $msg) use (&$error) {
101 101
             $error = $msg;
102 102
         });
103 103
         $renamed = rename($this->getPathname(), (string) $target);
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             throw new FileException(sprintf('Unable to write in the "%s" directory', $directory));
128 128
         }
129 129
 
130
-        $target = rtrim($directory, '/\\') . \DIRECTORY_SEPARATOR . (null === $name ? $this->getBasename() : $this->getName($name));
130
+        $target = rtrim($directory, '/\\').\DIRECTORY_SEPARATOR.(null === $name ? $this->getBasename() : $this->getName($name));
131 131
 
132 132
         return new self($target, false);
133 133
     }
@@ -170,18 +170,18 @@  discard block
 block discarded – undo
170 170
                 switch (true) {
171 171
                     case in_array($rule, hash_algos()):
172 172
                         $hash           = $this->hash($rule);
173
-                        $this->hashName = substr($hash, 0, 2) . DIRECTORY_SEPARATOR . substr($hash, 2);
173
+                        $this->hashName = substr($hash, 0, 2).DIRECTORY_SEPARATOR.substr($hash, 2);
174 174
                         break;
175 175
                     case is_callable($rule):
176 176
                         $this->hashName = call_user_func($rule);
177 177
                         break;
178 178
                     default:
179
-                        $this->hashName = date('Ymd') . DIRECTORY_SEPARATOR . md5((string) microtime(true));
179
+                        $this->hashName = date('Ymd').DIRECTORY_SEPARATOR.md5((string) microtime(true));
180 180
                         break;
181 181
                 }
182 182
             }
183 183
         }
184 184
 
185
-        return $this->hashName . '.' . $this->extension();
185
+        return $this->hashName.'.'.$this->extension();
186 186
     }
187 187
 }
Please login to merge, or discard this patch.
src/think/Db.php 1 patch
Spacing   +4 added lines, -4 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;
14 14
 
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     public function getConfig(string $name = '', $default = null)
69 69
     {
70 70
         if ('' !== $name) {
71
-            return $this->config->get('database.' . $name, $default);
71
+            return $this->config->get('database.'.$name, $default);
72 72
         }
73 73
 
74 74
         return $this->config->get('database', []);
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
     public function event(string $event, callable $callback): void
94 94
     {
95 95
         if ($this->event) {
96
-            $this->event->listen('db.' . $event, $callback);
96
+            $this->event->listen('db.'.$event, $callback);
97 97
         }
98 98
     }
99 99
 
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
     public function trigger(string $event, $params = null, bool $once = false)
109 109
     {
110 110
         if ($this->event) {
111
-            return $this->event->trigger('db.' . $event, $params, $once);
111
+            return $this->event->trigger('db.'.$event, $params, $once);
112 112
         }
113 113
     }
114 114
 }
Please login to merge, or discard this patch.
src/think/facade/Env.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\facade;
14 14
 
Please login to merge, or discard this patch.
src/think/facade/Console.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\facade;
14 14
 
Please login to merge, or discard this patch.
src/think/facade/Middleware.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\facade;
14 14
 
Please login to merge, or discard this patch.
src/think/facade/Cookie.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\facade;
14 14
 
Please login to merge, or discard this patch.