Completed
Pull Request — 6.0 (#2047)
by
unknown
07:07
created
src/think/middleware/AllowCrossDomain.php 1 patch
Spacing   +3 added lines, -3 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\middleware;
14 14
 
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     public function __construct(Config $config)
34 34
     {
35 35
         $this->cookieDomain = $config->get('cookie.domain', '');
36
-        if(is_string($this->cookieDomain)) {
36
+        if (is_string($this->cookieDomain)) {
37 37
             $this->cookieDomain = explode(',', $this->cookieDomain);
38 38
         }
39 39
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             if ($origin && (!empty($this->cookieDomain) && in_array($origin, $this->cookieDomain))) {
57 57
                 $header['Access-Control-Allow-Origin'] = $origin;
58
-            } else if(in_array('*', $this->cookieDomain)) {
58
+            } else if (in_array('*', $this->cookieDomain)) {
59 59
                 $header['Access-Control-Allow-Origin'] = '*';
60 60
             }
61 61
         }
Please login to merge, or discard this patch.