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 = [];