mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-11 07:02:13 +00:00
[!!!] Added type definitions to property types
- Request: optimized getIp method and reversed the order so proxy is always checked first.
This commit is contained in:
@@ -37,19 +37,19 @@ class SimpleRouter
|
||||
* Default namespace added to all routes
|
||||
* @var string|null
|
||||
*/
|
||||
protected static $defaultNamespace;
|
||||
protected static ?string $defaultNamespace = null;
|
||||
|
||||
/**
|
||||
* The response object
|
||||
* @var Response
|
||||
*/
|
||||
protected static $response;
|
||||
protected static Response $response;
|
||||
|
||||
/**
|
||||
* Router instance
|
||||
* @var Router
|
||||
*/
|
||||
protected static $router;
|
||||
protected static ?Router $router = null;
|
||||
|
||||
/**
|
||||
* Start routing
|
||||
@@ -493,7 +493,7 @@ class SimpleRouter
|
||||
* Prepends the default namespace to all new routes added.
|
||||
*
|
||||
* @param ILoadableRoute|IRoute $route
|
||||
* @return IRoute
|
||||
* @return IRoute|ILoadableRoute
|
||||
*/
|
||||
public static function addDefaultNamespace(IRoute $route): IRoute
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user