[!!!] 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:
sessingo
2023-04-02 03:10:27 +02:00
parent dc3b1fe74e
commit 5946397c15
25 changed files with 135 additions and 129 deletions
@@ -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);
}
/**