refactor(router): Align type hint for optional parameter in docblock

This commit is contained in:
kj
2026-02-01 07:47:04 -03:00
parent ce03bdb27d
commit 8cd5e114dd

View File

@@ -20,6 +20,7 @@ class Router
private static array $put = []; private static array $put = [];
private static array $patch = []; private static array $patch = [];
private static array $delete = []; private static array $delete = [];
/** /**
* Stores the method and index of the last configured route, e.g., ['get', 0]. * Stores the method and index of the last configured route, e.g., ['get', 0].
* Used for chaining methods like middleware() or reconfigure(). * Used for chaining methods like middleware() or reconfigure().
@@ -27,12 +28,14 @@ class Router
* @var array $last * @var array $last
*/ */
private static array $last; private static array $last;
/** /**
* Stores the parameters extracted from the current matching route. * Stores the parameters extracted from the current matching route.
* *
* @var Neuron $params * @var Neuron $params
*/ */
public static Neuron $params; public static Neuron $params;
/** /**
* The callback function to be executed when no route matches. * The callback function to be executed when no route matches.
* *
@@ -132,7 +135,7 @@ class Router
* Only one middleware can be added at a time. * Only one middleware can be added at a time.
* *
* @param callable $callback * @param callable $callback
* @param int $priority Optional priority for the middleware execution order. * @param int|null $priority Optional priority for the middleware execution order.
* *
* @return static * @return static
* Returns the current instance. * Returns the current instance.