diff --git a/src/Validator/Validator.php b/src/Validator/Validator.php index e3c369c..2646db3 100644 --- a/src/Validator/Validator.php +++ b/src/Validator/Validator.php @@ -90,10 +90,9 @@ class Validator /** - * @param ServerRequestInterface|Request $request * @return bool */ - public function run(ServerRequestInterface|Request $request): bool + public function run(): bool { foreach ($this->rules as $name => $rule) { foreach ($rule as $item) { diff --git a/src/Validator/ValidatorMiddleware.php b/src/Validator/ValidatorMiddleware.php index 68e3fc5..20a1fa8 100644 --- a/src/Validator/ValidatorMiddleware.php +++ b/src/Validator/ValidatorMiddleware.php @@ -36,7 +36,7 @@ class ValidatorMiddleware implements MiddlewareInterface public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface { $validator = $this->validator->bindData($request); - if (!$validator->run($request)) { + if (!$validator->run()) { return $this->response->html($validator->error(), 415); } else { return $handler->handle($request);