Skip to content

Commit

Permalink
Added Phpdoc to the Route::add method
Browse files Browse the repository at this point in the history
For easier understanding of accepted types and better code validation support
  • Loading branch information
Sander A committed Feb 21, 2019
1 parent 33c54c8 commit 4322382
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4322382

Please sign in to comment.