1
0
mirror of https://github.com/dannyvankooten/AltoRouter.git synced 2025-08-04 15:37:45 +02:00

Merge branch 'master' of github.com:dannyvankooten/AltoRouter

This commit is contained in:
Danny van Kooten
2025-01-05 21:30:50 +01:00

View File

@@ -117,7 +117,7 @@ class AltoRouter
* @param string $name Optional name of this route. Supply if you want to reverse route this url in your application. * @param string $name Optional name of this route. Supply if you want to reverse route this url in your application.
* @throws Exception * @throws Exception
*/ */
public function map(string $method, string $route, $target, string $name = null) public function map(string $method, string $route, $target, ?string $name = null)
{ {
$this->routes[] = [$method, $route, $target, $name]; $this->routes[] = [$method, $route, $target, $name];
@@ -184,7 +184,7 @@ class AltoRouter
* @param string $requestMethod * @param string $requestMethod
* @return array|boolean Array with route information on success, false on failure (no match). * @return array|boolean Array with route information on success, false on failure (no match).
*/ */
public function match(string $requestUrl = null, string $requestMethod = null) public function match(?string $requestUrl = null, ?string $requestMethod = null)
{ {
$params = []; $params = [];