From 7ea5246681d85ba229b0960c4587ae52ba60b2b5 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Tue, 14 Aug 2018 22:55:12 +0200 Subject: [PATCH] PHPDoc fixes Add "@throws" tags to Dispatcher::dispatch with HttpRouteNotFoundException and HttpMethodNotAllowedException Add mixed return and HttpMethodNotAllowedException to Dispatcher::dispatchRoute Add string return to Dispatcher::checkFallbacks Add mixed return to Dispatcher::dispatchVariableRoute --- src/Phroute/Dispatcher.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Phroute/Dispatcher.php b/src/Phroute/Dispatcher.php index 6e637e5..5ad8a60 100644 --- a/src/Phroute/Dispatcher.php +++ b/src/Phroute/Dispatcher.php @@ -41,6 +41,8 @@ public function __construct(RouteDataInterface $data, HandlerResolverInterface $ * @param $httpMethod * @param $uri * @return mixed|null + * @throws Exception\HttpRouteNotFoundException + * @throws Exception\HttpMethodNotAllowedException */ public function dispatch($httpMethod, $uri) { @@ -111,7 +113,9 @@ private function parseFilters($filters) * * @param $httpMethod * @param $uri + * @return mixed * @throws Exception\HttpRouteNotFoundException + * @throws Exception\HttpMethodNotAllowedException */ private function dispatchRoute($httpMethod, $uri) { @@ -148,6 +152,7 @@ private function dispatchStaticRoute($httpMethod, $uri) * * @param $routes * @param $httpMethod + * @return string * @throws Exception\HttpMethodNotAllowedException */ private function checkFallbacks($routes, $httpMethod) @@ -177,6 +182,7 @@ private function checkFallbacks($routes, $httpMethod) * * @param $httpMethod * @param $uri + * @return mixed * @throws Exception\HttpMethodNotAllowedException * @throws Exception\HttpRouteNotFoundException */