From 2d789b349472a957ce8182c5b7c84c0fb354e7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 11 Sep 2020 17:34:15 +0800 Subject: [PATCH] e --- Database/ActiveQuery.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Database/ActiveQuery.php b/Database/ActiveQuery.php index c55b46d6..29592e38 100644 --- a/Database/ActiveQuery.php +++ b/Database/ActiveQuery.php @@ -218,10 +218,9 @@ class ActiveQuery extends Component */ public function all() { - $collect = new Collection($this, - $this->modelClass::getDb()->createCommand($this->queryBuilder())->all() - , $this->modelClass - ); + $collect = new Collection($this, $this->modelClass::getDb() + ->createCommand($this->queryBuilder()) + ->all(), $this->modelClass); if ($this->asArray) { return $collect->toArray(); } @@ -234,7 +233,7 @@ class ActiveQuery extends Component * @return ActiveRecord * @throws Exception */ - public function populate($model, $data) + public function populate(ActiveRecord $model, $data) { return $this->getWith($model::populate($data)); }