From 4844d2582a2ba189885c8133bc6347d30de108e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Sat, 16 Jan 2021 17:02:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Database/ActiveRecord.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Database/ActiveRecord.php b/Database/ActiveRecord.php index ab7caaee..d571afd9 100644 --- a/Database/ActiveRecord.php +++ b/Database/ActiveRecord.php @@ -338,10 +338,10 @@ class ActiveRecord extends BaseActiveRecord * @param string $modelName * @param $foreignKey * @param $localKey - * @return HasOne + * @return ActiveQuery * @throws Exception */ - public function hasOne(string $modelName, $foreignKey, $localKey): HasOne + public function hasOne(string $modelName, $foreignKey, $localKey): mixed { if (!$this->has($localKey)) { throw new Exception("Need join table primary key."); @@ -359,10 +359,10 @@ class ActiveRecord extends BaseActiveRecord * @param $modelName * @param $foreignKey * @param $localKey - * @return HasCount + * @return ActiveQuery * @throws Exception */ - public function hasCount($modelName, $foreignKey, $localKey): HasCount + public function hasCount($modelName, $foreignKey, $localKey): mixed { if (!$this->has($localKey)) { throw new Exception("Need join table primary key."); @@ -380,10 +380,10 @@ class ActiveRecord extends BaseActiveRecord * @param $modelName * @param $foreignKey * @param $localKey - * @return HasMany + * @return ActiveQuery * @throws Exception */ - public function hasMany($modelName, $foreignKey, $localKey): HasMany + public function hasMany($modelName, $foreignKey, $localKey): mixed { if (!$this->has($localKey)) { throw new Exception("Need join table primary key."); @@ -400,10 +400,10 @@ class ActiveRecord extends BaseActiveRecord * @param $modelName * @param $foreignKey * @param $localKey - * @return HasMany + * @return ActiveQuery * @throws Exception */ - public function hasIn($modelName, $foreignKey, $localKey): HasMany + public function hasIn($modelName, $foreignKey, $localKey): mixed { if (!$this->has($localKey)) { throw new Exception("Need join table primary key.");