Passed
Push — 6.0 ( a96dbf...0dcb84 )
by yun
04:31
created
src/think/Route.php 1 patch
Spacing   +12 added lines, -12 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
 
@@ -175,9 +175,9 @@  discard block
 block discarded – undo
175 175
             $this->cache = $this->app->cache->store($this->config['route_check_cache'] === true ? '' : $this->config['route_check_cache']);
176 176
         }
177 177
 
178
-        if (is_file($this->app->getRuntimePath() . 'route.php')) {
178
+        if (is_file($this->app->getRuntimePath().'route.php')) {
179 179
             // 读取路由映射文件
180
-            $this->import(include $this->app->getRuntimePath() . 'route.php');
180
+            $this->import(include $this->app->getRuntimePath().'route.php');
181 181
         }
182 182
     }
183 183
 
@@ -390,13 +390,13 @@  discard block
 block discarded – undo
390 390
         if (is_null($domain)) {
391 391
             $domain = $this->host;
392 392
         } elseif (false === strpos($domain, '.')) {
393
-            $domain .= '.' . $this->request->rootDomain();
393
+            $domain .= '.'.$this->request->rootDomain();
394 394
         }
395 395
 
396 396
         $subDomain = $this->request->subDomain();
397 397
 
398 398
         if (strpos($subDomain, '.')) {
399
-            $name = '*' . strstr($subDomain, '.');
399
+            $name = '*'.strstr($subDomain, '.');
400 400
         }
401 401
 
402 402
         if (isset($this->bind[$domain])) {
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
         $this->init();
716 716
 
717 717
         if ($withRoute) {
718
-            $checkCallback = function () use ($request, $withRoute) {
718
+            $checkCallback = function() use ($request, $withRoute) {
719 719
                 //加载路由
720 720
                 $withRoute();
721 721
                 return $this->check();
@@ -734,7 +734,7 @@  discard block
 block discarded – undo
734 734
 
735 735
         $dispatch->init($this->app);
736 736
 
737
-        $this->app->middleware->add(function () use ($dispatch) {
737
+        $this->app->middleware->add(function() use ($dispatch) {
738 738
             try {
739 739
                 $response = $dispatch->run();
740 740
             } catch (HttpResponseException $exception) {
@@ -758,7 +758,7 @@  discard block
 block discarded – undo
758 758
             $closure  = $this->config['route_check_cache_key'];
759 759
             $routeKey = $closure($request);
760 760
         } else {
761
-            $routeKey = md5($request->baseUrl(true) . ':' . $request->method());
761
+            $routeKey = md5($request->baseUrl(true).':'.$request->method());
762 762
         }
763 763
 
764 764
         return $routeKey;
@@ -808,10 +808,10 @@  discard block
 block discarded – undo
808 808
             $path = $pathinfo;
809 809
         } elseif ($suffix) {
810 810
             // 去除正常的URL后缀
811
-            $path = preg_replace('/\.(' . ltrim($suffix, '.') . ')$/i', '', $pathinfo);
811
+            $path = preg_replace('/\.('.ltrim($suffix, '.').')$/i', '', $pathinfo);
812 812
         } else {
813 813
             // 允许任何后缀访问
814
-            $path = preg_replace('/\.' . $this->request->ext() . '$/i', '', $pathinfo);
814
+            $path = preg_replace('/\.'.$this->request->ext().'$/i', '', $pathinfo);
815 815
         }
816 816
 
817 817
         return $path;
@@ -854,9 +854,9 @@  discard block
 block discarded – undo
854 854
                 $item = $this->domains[$this->host];
855 855
             } elseif (isset($this->domains[$subDomain])) {
856 856
                 $item = $this->domains[$subDomain];
857
-            } elseif (isset($this->domains['*.' . $domain2]) && !empty($domain3)) {
857
+            } elseif (isset($this->domains['*.'.$domain2]) && !empty($domain3)) {
858 858
                 // 泛三级域名
859
-                $item      = $this->domains['*.' . $domain2];
859
+                $item      = $this->domains['*.'.$domain2];
860 860
                 $panDomain = $domain3;
861 861
             } elseif (isset($this->domains['*']) && !empty($domain2)) {
862 862
                 // 泛二级域名
Please login to merge, or discard this patch.