From 5f199ccb19b8ea3f08ca58d3e456dda7cabd76c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 27 Aug 2021 12:24:52 +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 --- http-helper/Context/HttpParams.php | 6 +++--- http-helper/Context/Request.php | 21 ++------------------- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/http-helper/Context/HttpParams.php b/http-helper/Context/HttpParams.php index 75e85453..fc706dff 100644 --- a/http-helper/Context/HttpParams.php +++ b/http-helper/Context/HttpParams.php @@ -91,12 +91,12 @@ trait HttpParams /** - * @return mixed + * @return string * @throws Exception */ - public function getRawContent(): mixed + public function getContent(): string { - return $this->_rawContent; + return $this->_body; } diff --git a/http-helper/Context/Request.php b/http-helper/Context/Request.php index 3607f416..3f62352f 100644 --- a/http-helper/Context/Request.php +++ b/http-helper/Context/Request.php @@ -182,8 +182,9 @@ class Request extends HttpService implements RequestInterface /** * @param $value + * @return mixed */ - public function setGrantAuthorization($value) + public function setGrantAuthorization($value): mixed { return $this->_grant = $value; } @@ -231,7 +232,6 @@ class Request extends HttpService implements RequestInterface if (!empty($this->_platform)) { return $this->_platform; } - $user = $this->getAgent(); $match = preg_match('/\(.*\)?/', $user, $output); if (!$match || count($output) < 1) { @@ -346,23 +346,6 @@ class Request extends HttpService implements RequestInterface return $this->isCli === TRUE; } - - /** - * @param $name - * @param $value - * - * @throws Exception - */ - public function __set($name, $value) - { - $method = 'set' . ucfirst($name); - if (method_exists($this, $method)) { - $this->$method($value); - } else { - parent::__set($name, $value); // TODO: Change the autogenerated stub - } - } - /** * @return mixed|null */