From c3f7a669a820714b250f02110f6e96fd2bce0efc Mon Sep 17 00:00:00 2001 From: Danny van Kooten Date: Tue, 3 Nov 2015 07:37:36 +0700 Subject: [PATCH] Add `@throws` declaration to method that can throw an Exception. --- AltoRouter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AltoRouter.php b/AltoRouter.php index 78fe0c0..dee3ba2 100644 --- a/AltoRouter.php +++ b/AltoRouter.php @@ -46,6 +46,7 @@ class AltoRouter { * @param array $routes * @return void * @author Koen Punt + * @throws Exception */ public function addRoutes($routes){ if(!is_array($routes) && !$routes instanceof Traversable) { @@ -80,6 +81,7 @@ class AltoRouter { * @param string $route The route regex, custom regex must start with an @. You can use multiple pre-set regex filters, like [i:id] * @param mixed $target The target where this route should point to. Can be anything. * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application. + * @throws Exception */ public function map($method, $route, $target, $name = null) { @@ -105,6 +107,7 @@ class AltoRouter { * @param string $routeName The name of the route. * @param array @params Associative array of parameters to replace placeholders with. * @return string The URL of the route with named parameters in place. + * @throws Exception */ public function generate($routeName, array $params = array()) {