Completed
Push — 6.0 ( ecd628...bb666d )
by yun
08:33
created
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/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.
src/think/response/View.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\response;
14 14
 
Please login to merge, or discard this patch.
src/think/response/Json.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\response;
14 14
 
Please login to merge, or discard this patch.
src/think/route/Url.php 1 patch
Spacing   +21 added lines, -21 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\route;
14 14
 
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
                 }
191 191
             }
192 192
         } elseif (false === strpos($domain, '.') && 0 !== strpos($domain, $rootDomain)) {
193
-            $domain .= '.' . $rootDomain;
193
+            $domain .= '.'.$rootDomain;
194 194
         }
195 195
 
196 196
         if (false !== strpos($domain, '://')) {
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
             $scheme = $this->https || $request->isSsl() ? 'https://' : 'http://';
200 200
         }
201 201
 
202
-        return $scheme . $domain;
202
+        return $scheme.$domain;
203 203
     }
204 204
 
205 205
     /**
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
             }
219 219
         }
220 220
 
221
-        return (empty($suffix) || 0 === strpos($suffix, '.')) ? (string) $suffix : '.' . $suffix;
221
+        return (empty($suffix) || 0 === strpos($suffix, '.')) ? (string) $suffix : '.'.$suffix;
222 222
     }
223 223
 
224 224
     /**
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
                 $app        = empty($path) ? $app : array_pop($path);
256 256
             }
257 257
 
258
-            $url = $controller . '/' . $action;
258
+            $url = $controller.'/'.$action;
259 259
 
260 260
             if ($app && $this->app->config->get('app.auto_multi_app')) {
261 261
                 $bind = $this->app->config->get('app.domain_bind', []);
@@ -265,9 +265,9 @@  discard block
 block discarded – undo
265 265
                     $map = $this->app->config->get('app.app_map', []);
266 266
 
267 267
                     if ($key = array_search($app, $map)) {
268
-                        $url = $key . '/' . $url;
268
+                        $url = $key.'/'.$url;
269 269
                     } else {
270
-                        $url = $app . '/' . $url;
270
+                        $url = $app.'/'.$url;
271 271
                     }
272 272
                 }
273 273
             }
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
             }
333 333
 
334 334
             if (!in_array($request->port(), [80, 443])) {
335
-                $domain .= ':' . $request->port();
335
+                $domain .= ':'.$request->port();
336 336
             }
337 337
 
338 338
             if (empty($pattern)) {
@@ -343,12 +343,12 @@  discard block
 block discarded – undo
343 343
 
344 344
             foreach ($pattern as $key => $val) {
345 345
                 if (isset($vars[$key])) {
346
-                    $url = str_replace(['[:' . $key . ']', '<' . $key . '?>', ':' . $key, '<' . $key . '>'], $type ? $vars[$key] : urlencode((string) $vars[$key]), $url);
346
+                    $url = str_replace(['[:'.$key.']', '<'.$key.'?>', ':'.$key, '<'.$key.'>'], $type ? $vars[$key] : urlencode((string) $vars[$key]), $url);
347 347
                     unset($vars[$key]);
348 348
                     $url    = str_replace(['/?', '-?'], ['/', '-'], $url);
349 349
                     $result = [rtrim($url, '?/-'), $domain, $suffix];
350 350
                 } elseif (2 == $val) {
351
-                    $url    = str_replace(['/[:' . $key . ']', '[:' . $key . ']', '<' . $key . '?>'], '', $url);
351
+                    $url    = str_replace(['/[:'.$key.']', '[:'.$key.']', '<'.$key.'?>'], '', $url);
352 352
                     $url    = str_replace(['/?', '-?'], ['/', '-'], $url);
353 353
                     $result = [rtrim($url, '?/-'), $domain, $suffix];
354 354
                 } else {
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
         if (0 === strpos($url, '[') && $pos = strpos($url, ']')) {
377 377
             // [name] 表示使用路由命名标识生成URL
378 378
             $name = substr($url, 1, $pos - 1);
379
-            $url  = 'name' . substr($url, $pos + 1);
379
+            $url  = 'name'.substr($url, $pos + 1);
380 380
         }
381 381
 
382 382
         if (false === strpos($url, '://') && 0 !== strpos($url, '/')) {
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
         }
404 404
 
405 405
         if ($url) {
406
-            $checkName   = isset($name) ? $name : $url . (isset($info['query']) ? '?' . $info['query'] : '');
406
+            $checkName   = isset($name) ? $name : $url.(isset($info['query']) ? '?'.$info['query'] : '');
407 407
             $checkDomain = $domain && is_string($domain) ? $domain : null;
408 408
 
409 409
             $rule = $this->route->getName($checkName, $checkDomain);
@@ -430,10 +430,10 @@  discard block
 block discarded – undo
430 430
             }
431 431
 
432 432
             if ($request->app() && $this->app->config->get('app.auto_multi_app') && !$this->app->http->isBindDomain()) {
433
-                $url = $request->app() . '/' . $url;
433
+                $url = $request->app().'/'.$url;
434 434
             }
435 435
         } elseif (!empty($rule) && isset($name)) {
436
-            throw new \InvalidArgumentException('route name not exists:' . $name);
436
+            throw new \InvalidArgumentException('route name not exists:'.$name);
437 437
         } else {
438 438
             // 检测URL绑定
439 439
             $bind = $this->route->getDomainBind($domain && is_string($domain) ? $domain : null);
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
             $file = str_replace('\\', '/', dirname($file));
472 472
         }
473 473
 
474
-        $url = rtrim($file, '/') . '/' . $url;
474
+        $url = rtrim($file, '/').'/'.$url;
475 475
 
476 476
         // URL后缀
477 477
         if ('/' == substr($url, -1) || '' == $url) {
@@ -481,32 +481,32 @@  discard block
 block discarded – undo
481 481
         }
482 482
 
483 483
         // 锚点
484
-        $anchor = !empty($anchor) ? '#' . $anchor : '';
484
+        $anchor = !empty($anchor) ? '#'.$anchor : '';
485 485
 
486 486
         // 参数组装
487 487
         if (!empty($vars)) {
488 488
             // 添加参数
489 489
             if ($this->route->config('url_common_param')) {
490 490
                 $vars = http_build_query($vars);
491
-                $url .= $suffix . '?' . $vars . $anchor;
491
+                $url .= $suffix.'?'.$vars.$anchor;
492 492
             } else {
493 493
                 foreach ($vars as $var => $val) {
494 494
                     if ('' !== $val) {
495
-                        $url .= $depr . $var . $depr . urlencode((string) $val);
495
+                        $url .= $depr.$var.$depr.urlencode((string) $val);
496 496
                     }
497 497
                 }
498 498
 
499
-                $url .= $suffix . $anchor;
499
+                $url .= $suffix.$anchor;
500 500
             }
501 501
         } else {
502
-            $url .= $suffix . $anchor;
502
+            $url .= $suffix.$anchor;
503 503
         }
504 504
 
505 505
         // 检测域名
506 506
         $domain = $this->parseDomain($url, $domain);
507 507
 
508 508
         // URL组装
509
-        return $domain . rtrim($this->root, '/') . '/' . ltrim($url, '/');
509
+        return $domain.rtrim($this->root, '/').'/'.ltrim($url, '/');
510 510
     }
511 511
 
512 512
     public function __toString()
Please login to merge, or discard this patch.