From 17492c78fafde0480856739057d7e63c27070759 Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sun, 3 Apr 2022 00:47:44 +0800 Subject: [PATCH] Fix context PHPDoc return type --- src/ZM/Context/Context.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ZM/Context/Context.php b/src/ZM/Context/Context.php index 16bffaeb..a17d1a13 100644 --- a/src/ZM/Context/Context.php +++ b/src/ZM/Context/Context.php @@ -4,6 +4,7 @@ declare(strict_types=1); namespace ZM\Context; +use Closure; use Exception; use Stringable; use Swoole\Coroutine; @@ -170,9 +171,9 @@ class Context implements ContextInterface /** * only can used by cq->message event function - * @param array|string $msg 要回复的消息 - * @param bool $yield 是否协程挂起(true),是否绑定异步事件(Closure) - * @return array|bool 返回API调用结果 + * @param array|string $msg 要回复的消息 + * @param bool|callable|Closure $yield 是否协程挂起(true),是否绑定异步事件(Closure) + * @return array|bool 返回API调用结果 */ public function reply($msg, $yield = false) {