From 480c0e1158b614b17b498016514c2c389437a02d Mon Sep 17 00:00:00 2001 From: niqingyang Date: Tue, 19 Dec 2023 21:45:51 +0800 Subject: [PATCH] Update the comments of the method createQueryTo in ActiveRecordFactory so that the IDE can automatically identify the specific class of ActiveRecord --- src/ActiveRecordFactory.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ActiveRecordFactory.php b/src/ActiveRecordFactory.php index 887ef32c8..83635a038 100644 --- a/src/ActiveRecordFactory.php +++ b/src/ActiveRecordFactory.php @@ -20,17 +20,19 @@ public function __construct(private Factory $factory) /** * Allows you to create an active record instance through the factory. * - * @param class-string $arClass active record class. + * @param string $arClass active record class. * @param string $tableName The name of the table associated with this ActiveRecord class, if its empty string the * name will be generated automatically by calling {@see getTableName()} in the active record class. * @param ConnectionInterface|null $db the database connection used for creating active record instances. + * * @throws CircularReferenceException * @throws InvalidConfigException * @throws NotFoundException * @throws NotInstantiableException - * @return ActiveRecordInterface|T * - * @template T + * @psalm-template T + * @psalm-param class-string $arClass + * @psalm-return T */ public function createAR( string $arClass,