From 4322382046f3e3fed6cdd7718fe099c702789224 Mon Sep 17 00:00:00 2001 From: Sander A Date: Fri, 22 Feb 2019 01:08:36 +0200 Subject: [PATCH] Added Phpdoc to the Route::add method For easier understanding of accepted types and better code validation support --- Route.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Route.php b/Route.php index e47ea3a..c01c8e2 100644 --- a/Route.php +++ b/Route.php @@ -6,6 +6,13 @@ class Route{ private static $pathNotFound = null; private static $methodNotAllowed = null; + /** + * Function used to add a new route + * @param string $expression Route string or expression + * @param callable $function Function to call when route with allowed method is found + * @param string|array $method Either a string of allowed method or an array with string values + * + */ public static function add($expression, $function, $method = 'get'){ array_push(self::$routes,Array( 'expression' => $expression,