@@ -8,7 +8,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |