From 5538e461152ee8326b3b38f59ffdfb0f1c03f311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 19 Mar 2021 18:16:50 +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 --- Validator/BaseValidator.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Validator/BaseValidator.php b/Validator/BaseValidator.php index 1f5b908d..52ba8b8e 100644 --- a/Validator/BaseValidator.php +++ b/Validator/BaseValidator.php @@ -22,8 +22,7 @@ abstract class BaseValidator protected array $params = []; - /** @var ActiveRecord */ - protected ActiveRecord $model; + protected ?ActiveRecord $model = null; /** @@ -35,9 +34,9 @@ abstract class BaseValidator } /** - * @return ActiveRecord + * @return ActiveRecord|null */ - public function getModel(): ActiveRecord + public function getModel(): ?ActiveRecord { return $this->model; }