diff --git a/Validator.php b/Validator.php index 1eff678..c51a560 100644 --- a/Validator.php +++ b/Validator.php @@ -6,6 +6,7 @@ namespace validator; use Database\ModelInterface; +use Exception; use Kiri; /** @@ -15,6 +16,7 @@ use Kiri; class Validator extends BaseValidator { + /** * classMap */ @@ -42,6 +44,7 @@ class Validator extends BaseValidator 'round' => ['class' => RoundValidator::class,], ]; + /** @var BaseValidator[] */ private ?array $validators = []; @@ -51,6 +54,7 @@ class Validator extends BaseValidator * @param array $fields * @param array $rules * @return $this + * @throws Exception */ public function make(ModelInterface $model, array $fields, array $rules): static { @@ -72,10 +76,11 @@ class Validator extends BaseValidator /** * @param ModelInterface $model + * @param $field * @param $key * @param $val * @return array - * @throws + * @throws Exception */ protected function mapGen(ModelInterface $model, $field, $key, $val): array {