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; }