mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +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:
@@ -12,17 +12,17 @@ abstract class LoadableRoute extends Route implements ILoadableRoute
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $url;
|
||||
protected string $url;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $name;
|
||||
protected ?string $name = null;
|
||||
|
||||
/**
|
||||
* @var string|null
|
||||
*/
|
||||
protected $regex;
|
||||
protected ?string $regex = null;
|
||||
|
||||
/**
|
||||
* Loads and renders middlewares-classes
|
||||
@@ -195,7 +195,7 @@ abstract class LoadableRoute extends Route implements ILoadableRoute
|
||||
*/
|
||||
public function hasName(string $name): bool
|
||||
{
|
||||
return strtolower((string)$this->name) === strtolower((string)$name);
|
||||
return strtolower((string)$this->name) === strtolower($name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user