diff --git a/psalm.xml b/psalm.xml index 30258a7..030ec2f 100644 --- a/psalm.xml +++ b/psalm.xml @@ -1,7 +1,8 @@ stack) as $middleware) { - $chain = function ($request, $response) use ($dispatcher, $middleware, $chain) { - return $dispatcher->dispatch($middleware, $request, $response, $chain); + $chain = function ( + ServerRequestInterface $request, + ResponseInterface $response + ) use ($dispatcher, $middleware, $chain): ResponseInterface { + return $dispatcher->dispatch( + $middleware, + $request, + $response, + $chain + ); }; } diff --git a/src/Dispatching/Dispatcher.php b/src/Dispatching/Dispatcher.php index 5e6a76f..f420c4f 100644 --- a/src/Dispatching/Dispatcher.php +++ b/src/Dispatching/Dispatcher.php @@ -67,6 +67,10 @@ class Dispatcher implements DispatcherInterface } } + /** + * @param mixed[] $dispatchables + * @return DispatchStack + */ protected function getDispatchStack($dispatchables) { $stack = new DispatchStack($this);