This commit is contained in:
2021-01-26 17:00:51 +08:00
parent f6f179ad47
commit 48d5ffd93d
2 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -223,12 +223,12 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
/** /**
* @param $param * @param $param
* @param null $db * @param null $db
* @return static * @return $this
* @throws NotFindClassException * @throws NotFindClassException
* @throws ReflectionException * @throws ReflectionException
* @throws Exception * @throws Exception
*/ */
public static function findOne($param, $db = NULL): mixed public static function findOne($param, $db = NULL): static
{ {
if (is_numeric($param)) { if (is_numeric($param)) {
$primary = static::getColumns()->getPrimaryKeys(); $primary = static::getColumns()->getPrimaryKeys();
+2 -3
View File
@@ -24,10 +24,9 @@ abstract class HasBase
protected Collection|ActiveRecord $data; protected Collection|ActiveRecord $data;
/** /**
* @var IOrm * @var IOrm|ActiveRecord
*/ */
protected IOrm $model; protected mixed $model;
/** @var array */ /** @var array */
protected array $value = []; protected array $value = [];