@@ -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 | |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | */ |
105 | 105 | public static function create($data = '', string $type = 'html', int $code = 200): Response |
106 | 106 | { |
107 | - $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\' . ucfirst(strtolower($type)); |
|
107 | + $class = false !== strpos($type, '\\') ? $type : '\\think\\response\\'.ucfirst(strtolower($type)); |
|
108 | 108 | |
109 | 109 | return Container::getInstance()->invokeClass($class, [$data, $code]); |
110 | 110 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | http_response_code($this->code); |
150 | 150 | // 发送头部信息 |
151 | 151 | foreach ($this->header as $name => $val) { |
152 | - header($name . (!is_null($val) ? ':' . $val : '')); |
|
152 | + header($name.(!is_null($val) ? ':'.$val : '')); |
|
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
@@ -357,7 +357,7 @@ discard block |
||
357 | 357 | */ |
358 | 358 | public function contentType(string $contentType, string $charset = 'utf-8') |
359 | 359 | { |
360 | - $this->header['Content-Type'] = $contentType . '; charset=' . $charset; |
|
360 | + $this->header['Content-Type'] = $contentType.'; charset='.$charset; |
|
361 | 361 | |
362 | 362 | return $this; |
363 | 363 | } |