From fea9b50c3528a8ea82bf838d4e03e4a849083a8e Mon Sep 17 00:00:00 2001 From: "Kyour.cn" Date: Thu, 21 Nov 2024 10:17:00 +0800 Subject: [PATCH] =?UTF-8?q?find=E6=96=B9=E6=B3=95=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=80=BC=E7=B1=BB=E5=9E=8BIDE=E5=8F=8B=E5=A5=BD=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit phpstorm中模型通过find返回的值没有类型提示,比如模型自定义方法、@property和属性,非常不方便。 --- src/db/BaseQuery.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/db/BaseQuery.php b/src/db/BaseQuery.php index 30689cb4..4c34c8a3 100644 --- a/src/db/BaseQuery.php +++ b/src/db/BaseQuery.php @@ -1452,7 +1452,7 @@ public function select(array $data = []): Collection * @throws ModelNotFoundException * @throws DataNotFoundException * - * @return mixed + * @return static|array|null */ public function find($data = null, ?Closure $closure = null) {