From e6d334a1d3fa4c385bd1c832a5b8526e59e82fc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Sun, 16 Apr 2023 12:50:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=98=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Validator/BindForm.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Validator/BindForm.php b/src/Validator/BindForm.php index 13d49e8..aaaf0e0 100644 --- a/src/Validator/BindForm.php +++ b/src/Validator/BindForm.php @@ -21,13 +21,12 @@ class BindForm implements InjectParameterInterface /** - * @param object $class + * @param string $class * @param string $method * @return mixed * @throws ReflectionException - * @throws \Exception */ - public function dispatch(object $class, string $method): mixed + public function dispatch(string $class, string $method): mixed { $validator = new Validator(); $reflect = \Kiri::getDi()->getReflectionClass($this->formValidate); @@ -42,7 +41,7 @@ class BindForm implements InjectParameterInterface } $manager = \Kiri::getDi()->get(Middleware::class); - $manager->set($class::class, $method, ValidatorMiddleware::class, [$validator]); + $manager->set($class, $method, ValidatorMiddleware::class, [$validator]); return $validator; }