mirror of
https://github.com/yiisoft/yii2.git
synced 2025-10-27 20:06:19 +08:00
Fix @var annotations (#20517)
This commit is contained in:
@ -266,7 +266,10 @@ class ActiveQuery extends Query implements ActiveQueryInterface
|
||||
private function removeDuplicatedModels($models)
|
||||
{
|
||||
$hash = [];
|
||||
/** @var ActiveRecord $class */
|
||||
/**
|
||||
* @var ActiveRecord
|
||||
* @phpstan-var class-string<ActiveRecord>
|
||||
*/
|
||||
$class = $this->modelClass;
|
||||
$pks = $class::primaryKey();
|
||||
|
||||
|
||||
@ -339,7 +339,6 @@ trait ActiveRelationTrait
|
||||
return;
|
||||
}
|
||||
$model = reset($models);
|
||||
/** @var ActiveQueryInterface|ActiveQuery $relation */
|
||||
if ($model instanceof ActiveRecordInterface) {
|
||||
$relation = $model->getRelation($name);
|
||||
} else {
|
||||
@ -348,6 +347,7 @@ trait ActiveRelationTrait
|
||||
$relation = $modelClass::instance()->getRelation($name);
|
||||
}
|
||||
|
||||
/** @var ActiveQueryInterface|ActiveQuery $relation */
|
||||
if ($relation->multiple) {
|
||||
$buckets = $this->buildBuckets($primaryModels, $relation->link, null, null, false);
|
||||
if ($model instanceof ActiveRecordInterface) {
|
||||
|
||||
@ -49,15 +49,13 @@ if (version_compare(PHP_VERSION, '4.3', '<')) {
|
||||
* Note: this class definition does not match ordinary Yii style, because it should match PHP 4.3
|
||||
* and should not use features from newer PHP versions!
|
||||
*
|
||||
* @property array|null $result the check results, this property is for internal usage only.
|
||||
*
|
||||
* @author Paul Klimov <klimov.paul@gmail.com>
|
||||
* @since 2.0
|
||||
*/
|
||||
class YiiRequirementChecker
|
||||
{
|
||||
/**
|
||||
* @var Check result
|
||||
* @var array|null the check results, this property is for internal usage only.
|
||||
*/
|
||||
public $result;
|
||||
|
||||
|
||||
@ -626,7 +626,10 @@ class User extends Component
|
||||
$data = json_decode($value, true);
|
||||
if (is_array($data) && count($data) == 3) {
|
||||
list($id, $authKey, $duration) = $data;
|
||||
/** @var IdentityInterface $class */
|
||||
/**
|
||||
* @var IdentityInterface
|
||||
* @phpstan-var class-string<IdentityInterface>
|
||||
*/
|
||||
$class = $this->identityClass;
|
||||
$identity = $class::findIdentity($id);
|
||||
if ($identity !== null) {
|
||||
|
||||
Reference in New Issue
Block a user