From 8722b92a23ec122bd4ab23216cccd1f42895006d Mon Sep 17 00:00:00 2001 From: "n[oO]ne" Date: Thu, 2 May 2024 18:23:10 +0700 Subject: [PATCH] [#16577] - refactor: add @template for Model and add to @return in find and findFirst --- phalcon/Mvc/Model.zep | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/phalcon/Mvc/Model.zep b/phalcon/Mvc/Model.zep index 9276217bcd..6c455ef4c6 100644 --- a/phalcon/Mvc/Model.zep +++ b/phalcon/Mvc/Model.zep @@ -81,6 +81,7 @@ use Serializable; * echo "Great, a new robot was saved successfully!"; * } * ``` + * @template T of static */ abstract class Model extends AbstractInjectionAware implements EntityInterface, ModelInterface, ResultInterface, Serializable, JsonSerializable { @@ -1630,6 +1631,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * ], * 'hydration' => null * ] + * @return T[]|\Phalcon\Mvc\Model\ResultsetInterface */ public static function find(var parameters = null) -> { @@ -1748,7 +1750,7 @@ abstract class Model extends AbstractInjectionAware implements EntityInterface, * 'hydration' => null * ] * - * @return \Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row|null + * @return T|\Phalcon\Mvc\ModelInterface|\Phalcon\Mvc\Model\Row|null */ public static function findFirst(var parameters = null) -> var | null {