From c8a4c3beadbf43040fa648cbc94d71ccdf5185ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Tue, 12 Jan 2021 18:39: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 --- Database/Base/BaseActiveRecord.php | 10 ++++++---- Database/IOrm.php | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 871b8627..9ea32f69 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -193,11 +193,13 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess /** * @param $param - * @param $db - * @return $this - * @throws + * @param null $db + * @return static + * @throws NotFindClassException + * @throws ReflectionException + * @throws Exception */ - public static function findOne($param, $db = NULL): static + public static function findOne($param, $db = NULL): mixed { if (is_numeric($param)) { $primary = static::getColumns()->getPrimaryKeys(); diff --git a/Database/IOrm.php b/Database/IOrm.php index 2bb2a3fb..4e3d9a5a 100644 --- a/Database/IOrm.php +++ b/Database/IOrm.php @@ -21,7 +21,7 @@ interface IOrm * @param null $db * @return ActiveRecord */ - public static function findOne($param, $db = NULL): static; + public static function findOne($param, $db = NULL): mixed; /**