From a25b9478514ef50e12a6f241d0bd93bc3c610910 Mon Sep 17 00:00:00 2001 From: Yifans_Z <328361836@qq.com> Date: Thu, 26 Dec 2024 19:51:40 +0800 Subject: [PATCH] fix: add @template TModel of static for Eloquent (#1631) * fix: add @template TModel of static for Eloquent * fix: use `===` instead of `==` --------- Co-authored-by: Yifan Zhao --- resources/views/helper.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/views/helper.php b/resources/views/helper.php index 11b6917..e9b8a0e 100644 --- a/resources/views/helper.php +++ b/resources/views/helper.php @@ -23,7 +23,7 @@ */ $aliases) : ?> -namespace { +namespace { getDocComment(' ')) ?> getClassType() ?> getExtendsClass() ?> { @@ -47,9 +47,12 @@ namespace { $aliases) : ?> -namespace { +namespace { - getClassType() ?> getShortName() ?> extends getExtends() ?> {getExtendsNamespace() == '\Illuminate\Database\Eloquent') : ?> + getExtendsNamespace() === '\Illuminate\Database\Eloquent') : ?> + /** @template TModel of static */ + + getClassType() ?> getShortName() ?> extends getExtends() ?> {getExtendsNamespace() === '\Illuminate\Database\Eloquent') : ?> getMethods() as $method) : ?> getDocComment(' ')) ?> public static function getName() ?>(getParamsWithDefault() ?>)