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 0d4ccc0 commit 64b5b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ActiveRecordFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ 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.
Expand All @@ -34,7 +34,7 @@ public function __construct(private Factory $factory)
* @psalm-template T
* @psalm-param class-string<T> $arClass
* @psalm-return T

Check failure on line 36 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 36 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'
* @psalm-suppress LessSpecificReturnStatement
* @psalm-suppress ActiveRecordInterface
*/
public function createAR(
string $arClass,
Expand Down

0 comments on commit 64b5b31

Please sign in to comment.