From e28278e93ba7d64d052f5ba460f1e001b589801c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 2 Feb 2021 19:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Http/HttpParams.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/HttpServer/Http/HttpParams.php b/HttpServer/Http/HttpParams.php index 23c4f996..924dff92 100644 --- a/HttpServer/Http/HttpParams.php +++ b/HttpServer/Http/HttpParams.php @@ -11,6 +11,7 @@ namespace HttpServer\Http; use Exception; use HttpServer\Exception\RequestException; +use JetBrains\PhpStorm\Pure; use ReflectionException; use Snowflake\Core\Help; use Snowflake\Core\Json; @@ -150,7 +151,7 @@ class HttpParams /** * @return array */ - public function params(): array + #[Pure] public function params(): array { return array_merge($this->body ?? [], $this->files ?? []); } @@ -158,7 +159,7 @@ class HttpParams /** * @return array */ - public function load(): array + #[Pure] public function load(): array { return array_merge($this->files, $this->body, $this->gets); } @@ -231,8 +232,8 @@ class HttpParams * @param $name * @param bool $isNeed * @param int $round - * @return float - * @throws Exception + * @return float|null + * @throws RequestException */ public function float($name, $isNeed = FALSE, $round = 0): ?float { @@ -399,7 +400,7 @@ class HttpParams * @param $name * @return mixed */ - public function __get($name): mixed + #[Pure] public function __get($name): mixed { $load = $this->load();