@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @param File $file 文件 |
98 | 98 | * @param null|string|\Closure $rule 文件名规则 |
99 | 99 | * @param array $options 参数 |
100 | - * @return bool|string |
|
100 | + * @return string|false |
|
101 | 101 | */ |
102 | 102 | public function putFile(string $path, File $file, $rule = null, array $options = []) |
103 | 103 | { |
@@ -110,7 +110,7 @@ discard block |
||
110 | 110 | * @param File $file 文件 |
111 | 111 | * @param string $name 文件名 |
112 | 112 | * @param array $options 参数 |
113 | - * @return bool|string |
|
113 | + * @return string|false |
|
114 | 114 | */ |
115 | 115 | public function putFileAs(string $path, File $file, string $name, array $options = []) |
116 | 116 | { |
@@ -12,11 +12,11 @@ |
||
12 | 12 | |
13 | 13 | namespace think; |
14 | 14 | |
15 | +use Throwable; |
|
15 | 16 | use think\event\HttpEnd; |
16 | 17 | use think\event\HttpRun; |
17 | 18 | use think\event\RouteLoaded; |
18 | 19 | use think\exception\Handle; |
19 | -use Throwable; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * Web应用管理类 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | /** |
67 | 67 | * 获取渠道配置 |
68 | 68 | * @param string $channel |
69 | - * @param null $name |
|
69 | + * @param string $name |
|
70 | 70 | * @param null $default |
71 | 71 | * @return array |
72 | 72 | */ |
@@ -13,8 +13,8 @@ |
||
13 | 13 | namespace think\log; |
14 | 14 | |
15 | 15 | use Psr\Log\LoggerInterface; |
16 | -use think\contract\LogHandlerInterface; |
|
17 | 16 | use think\Event; |
17 | +use think\contract\LogHandlerInterface; |
|
18 | 18 | use think\event\LogWrite; |
19 | 19 | |
20 | 20 | class Channel implements LoggerInterface |
@@ -15,8 +15,8 @@ |
||
15 | 15 | use Closure; |
16 | 16 | use InvalidArgumentException; |
17 | 17 | use LogicException; |
18 | -use think\exception\Handle; |
|
19 | 18 | use Throwable; |
19 | +use think\exception\Handle; |
|
20 | 20 | |
21 | 21 | /** |
22 | 22 | * 中间件管理类 |
@@ -24,7 +24,7 @@ |
||
24 | 24 | |
25 | 25 | /** |
26 | 26 | * 初始数据 |
27 | - * @param $passable |
|
27 | + * @param Request $passable |
|
28 | 28 | * @return $this |
29 | 29 | */ |
30 | 30 | public function send($passable) |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | * 获取当前请求的参数 |
834 | 834 | * @access public |
835 | 835 | * @param string|array $name 变量名 |
836 | - * @param mixed $default 默认值 |
|
836 | + * @param string $default 默认值 |
|
837 | 837 | * @param string|array $filter 过滤方法 |
838 | 838 | * @return mixed |
839 | 839 | */ |
@@ -907,7 +907,7 @@ discard block |
||
907 | 907 | /** |
908 | 908 | * 获取路由参数 |
909 | 909 | * @access public |
910 | - * @param string|array $name 变量名 |
|
910 | + * @param boolean $name 变量名 |
|
911 | 911 | * @param mixed $default 默认值 |
912 | 912 | * @param string|array $filter 过滤方法 |
913 | 913 | * @return mixed |
@@ -941,7 +941,7 @@ discard block |
||
941 | 941 | /** |
942 | 942 | * 获取中间件传递的参数 |
943 | 943 | * @access public |
944 | - * @param mixed $name 变量名 |
|
944 | + * @param string $name 变量名 |
|
945 | 945 | * @param mixed $default 默认值 |
946 | 946 | * @return mixed |
947 | 947 | */ |
@@ -953,7 +953,7 @@ discard block |
||
953 | 953 | /** |
954 | 954 | * 获取POST参数 |
955 | 955 | * @access public |
956 | - * @param string|array $name 变量名 |
|
956 | + * @param boolean $name 变量名 |
|
957 | 957 | * @param mixed $default 默认值 |
958 | 958 | * @param string|array $filter 过滤方法 |
959 | 959 | * @return mixed |
@@ -984,6 +984,9 @@ discard block |
||
984 | 984 | return $this->input($this->put, $name, $default, $filter); |
985 | 985 | } |
986 | 986 | |
987 | + /** |
|
988 | + * @param string $content |
|
989 | + */ |
|
987 | 990 | protected function getInputData($content): array |
988 | 991 | { |
989 | 992 | $contentType = $this->contentType(); |
@@ -1079,7 +1082,7 @@ discard block |
||
1079 | 1082 | * @param mixed $name 数据名称 |
1080 | 1083 | * @param string $default 默认值 |
1081 | 1084 | * @param string|array $filter 过滤方法 |
1082 | - * @return mixed |
|
1085 | + * @return string |
|
1083 | 1086 | */ |
1084 | 1087 | public function cookie(string $name = '', $default = null, $filter = '') |
1085 | 1088 | { |
@@ -1216,7 +1219,7 @@ discard block |
||
1216 | 1219 | * @access public |
1217 | 1220 | * @param string $name header名称 |
1218 | 1221 | * @param string $default 默认值 |
1219 | - * @return string|array |
|
1222 | + * @return string |
|
1220 | 1223 | */ |
1221 | 1224 | public function header(string $name = '', string $default = null) |
1222 | 1225 | { |
@@ -1329,7 +1332,7 @@ discard block |
||
1329 | 1332 | * @access public |
1330 | 1333 | * @param array $data 数据源 |
1331 | 1334 | * @param string $name 字段名 |
1332 | - * @param mixed $default 默认值 |
|
1335 | + * @param string|null $default 默认值 |
|
1333 | 1336 | * @return mixed |
1334 | 1337 | */ |
1335 | 1338 | protected function getData(array $data, string $name, $default = null) |
@@ -100,7 +100,6 @@ |
||
100 | 100 | /** |
101 | 101 | * 设置文件类型 |
102 | 102 | * @access public |
103 | - * @param string $filename 文件名 |
|
104 | 103 | * @return $this |
105 | 104 | */ |
106 | 105 | public function mimeType(string $mimeType) |
@@ -722,7 +722,7 @@ |
||
722 | 722 | /** |
723 | 723 | * 路由调度 |
724 | 724 | * @param Request $request |
725 | - * @param Closure|bool $withRoute |
|
725 | + * @param Closure|null $withRoute |
|
726 | 726 | * @return Response |
727 | 727 | */ |
728 | 728 | public function dispatch(Request $request, $withRoute = true) |
@@ -15,7 +15,6 @@ discard block |
||
15 | 15 | use Closure; |
16 | 16 | use think\exception\RouteNotFoundException; |
17 | 17 | use think\route\Dispatch; |
18 | -use think\route\dispatch\Url as UrlDispatch; |
|
19 | 18 | use think\route\Domain; |
20 | 19 | use think\route\Resource; |
21 | 20 | use think\route\Rule; |
@@ -23,6 +22,7 @@ discard block |
||
23 | 22 | use think\route\RuleItem; |
24 | 23 | use think\route\RuleName; |
25 | 24 | use think\route\Url as UrlBuild; |
25 | +use think\route\dispatch\Url as UrlDispatch; |
|
26 | 26 | |
27 | 27 | /** |
28 | 28 | * 路由管理类 |