Skip to content

Commit

Permalink
Update the comments of the method createQueryTo in ActiveRecordFactor…
Browse files Browse the repository at this point in the history
…y so that the IDE can automatically identify the specific class of ActiveRecord
  • Loading branch information
niqingyang committed Dec 19, 2023
1 parent ae57733 commit 480c0e1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/ActiveRecordFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,19 @@ public function __construct(private Factory $factory)
/**
* Allows you to create an active record instance through the factory.
*
* @param class-string<T> $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<T> $arClass
* @psalm-return T

Check failure on line 35 in src/ActiveRecordFactory.php

View workflow job for this annotation

GitHub Actions / PHP 8-ubuntu-latest

MismatchingDocblockReturnType: Docblock has incorrect return type 'T:fn-yiisoft\activerecord\activerecordfactory::createar as object', should be 'Yiisoft\ActiveRecord\ActiveRecordInterface'

Check failure on line 35 in src/ActiveRecordFactory.php

View workflow job for this annotation

GitHub Actions / PHP 8.1-ubuntu-latest

MismatchingDocblockReturnType: Docblock has incorrect return type 'T:fn-yiisoft\activerecord\activerecordfactory::createar as object', should be 'Yiisoft\ActiveRecord\ActiveRecordInterface'
*/
public function createAR(
string $arClass,
Expand Down

0 comments on commit 480c0e1

Please sign in to comment.