diff --git a/HttpServer/IInterface/Middleware.php b/HttpServer/IInterface/Middleware.php index a6c6c58e..b9bab7b6 100644 --- a/HttpServer/IInterface/Middleware.php +++ b/HttpServer/IInterface/Middleware.php @@ -21,6 +21,6 @@ interface Middleware * @param Closure $next * @return mixed */ - public function handler(Request $request, Closure $next): mixed; + public function onHandler(Request $request, Closure $next): mixed; } diff --git a/HttpServer/Route/Node.php b/HttpServer/Route/Node.php index 70824b43..a1bd7ed5 100644 --- a/HttpServer/Route/Node.php +++ b/HttpServer/Route/Node.php @@ -404,7 +404,7 @@ class Node extends Application /** * @throws Exception */ - private function restructure() + private function restructure(): static { if (empty($this->handler)) { return $this;