From fa7ac67206908f28bf8b851c75cf1f58c6578625 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Tue, 19 Oct 2021 18:17:53 +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 --- src/ActiveQuery.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ActiveQuery.php b/src/ActiveQuery.php index 5a51be8..c0a48e2 100644 --- a/src/ActiveQuery.php +++ b/src/ActiveQuery.php @@ -132,7 +132,7 @@ class ActiveQuery extends Component implements ISqlBuilder if (empty($data)) { return NULL; } - return $this->modelClass::populate($data); + return $this->populate($data); } @@ -207,14 +207,13 @@ class ActiveQuery extends Component implements ISqlBuilder } /** - * @param ModelInterface $model * @param $data * @return ModelInterface * @throws Exception */ - public function populate(ModelInterface $model, $data): ModelInterface + public function populate($data): ModelInterface { - return $this->getWith($model::populate($data)); + return $this->getWith($this->modelClass::populate($data)); }