From 48d5ffd93d990b6b60de191d0b0c9e4de215e9cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 26 Jan 2021 17:00:51 +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/Base/BaseActiveRecord.php | 4 ++-- Database/HasBase.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 63c5d389..7b432071 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -223,12 +223,12 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess /** * @param $param * @param null $db - * @return static + * @return $this * @throws NotFindClassException * @throws ReflectionException * @throws Exception */ - public static function findOne($param, $db = NULL): mixed + public static function findOne($param, $db = NULL): static { if (is_numeric($param)) { $primary = static::getColumns()->getPrimaryKeys(); diff --git a/Database/HasBase.php b/Database/HasBase.php index 3af982af..337e056b 100644 --- a/Database/HasBase.php +++ b/Database/HasBase.php @@ -24,10 +24,9 @@ abstract class HasBase protected Collection|ActiveRecord $data; /** - * @var IOrm + * @var IOrm|ActiveRecord */ - protected IOrm $model; - + protected mixed $model; /** @var array */ protected array $value = [];