From d075dd73a440a379dcbbc331419815830f29bb23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 29 Nov 2021 11:22:49 +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 --- src/ClientAbstracts.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ClientAbstracts.php b/src/ClientAbstracts.php index 2b04498..962cb1a 100644 --- a/src/ClientAbstracts.php +++ b/src/ClientAbstracts.php @@ -63,14 +63,11 @@ abstract class ClientAbstracts implements IClient /** - * @return string|ResponseInterface|null + * @return string|null */ - public function getBody(): string|ResponseInterface|null + public function getBody(): string|null { - if ($this->body instanceof ResponseInterface) { - return $this->body->getBody()->getContents(); - } - return $this->body; + return $this->body->getBody()->getContents(); }