From fdb9b63debc02ce72a57ac245b4792b01255ba6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 6 Nov 2023 22:45:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20echo=20=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WeChat/Contracts/BasicPushEvent.php | 2 +- WeChat/Contracts/BasicWePay.php | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WeChat/Contracts/BasicPushEvent.php b/WeChat/Contracts/BasicPushEvent.php index dc6f30d..36f1d96 100644 --- a/WeChat/Contracts/BasicPushEvent.php +++ b/WeChat/Contracts/BasicPushEvent.php @@ -144,7 +144,7 @@ class BasicPushEvent * @param array $data 消息内容 * @param boolean $return 是否返回XML内容 * @param boolean $isEncrypt 是否加密内容 - * @return string + * @return string|void * @throws \WeChat\Exceptions\InvalidDecryptException */ public function reply(array $data = [], $return = false, $isEncrypt = false) diff --git a/WeChat/Contracts/BasicWePay.php b/WeChat/Contracts/BasicWePay.php index a8c8ee2..937f581 100644 --- a/WeChat/Contracts/BasicWePay.php +++ b/WeChat/Contracts/BasicWePay.php @@ -153,14 +153,12 @@ class BasicWePay * 数组直接转xml数据输出 * @param array $data * @param bool $isReturn - * @return string + * @return string|void */ public function toXml(array $data, $isReturn = false) { $xml = Tools::arr2xml($data); - if ($isReturn) { - return $xml; - } + if ($isReturn) return $xml; echo $xml; }