Completed
Pull Request — 6.0 (#2080)
by
unknown
08:02
created
src/think/Response.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
 
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public static function create($data = '', string $type = 'html', int $code = 200): Response
104 104
     {
105
-        $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst(strtolower($type));
105
+        $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\'.ucfirst(strtolower($type));
106 106
 
107 107
         return Container::getInstance()->invokeClass($class, [$data, $code]);
108 108
     }
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             http_response_code($this->code);
136 136
             // 发送头部信息
137 137
             foreach ($this->header as $name => $val) {
138
-                header($name . (!is_null($val) ? ':' . $val : ''));
138
+                header($name.(!is_null($val) ? ':'.$val : ''));
139 139
             }
140 140
         }
141 141
         if ($this->cookie) {
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
      */
345 345
     public function contentType(string $contentType, string $charset = 'utf-8')
346 346
     {
347
-        $this->header['Content-Type'] = $contentType . '; charset=' . $charset;
347
+        $this->header['Content-Type'] = $contentType.'; charset='.$charset;
348 348
 
349 349
         return $this;
350 350
     }
Please login to merge, or discard this patch.