[CLEANUP] Cleaned up code

- Change variable $values to $settings in Route::setSettings method.
- Added return types to methods.
- Added type to method variables.
- Change ClassNotFoundException so required parameters are first.
This commit is contained in:
Simon Sessingø
2021-03-29 00:00:01 +02:00
parent 9ed2d2b8d1
commit c916a1dd2e
16 changed files with 72 additions and 72 deletions
+4 -4
View File
@@ -10,11 +10,11 @@ interface IRoute
/**
* Method called to check if a domain matches
*
* @param string $route
* @param string $url
* @param Request $request
* @return bool
*/
public function matchRoute($route, Request $request): bool;
public function matchRoute(string $url, Request $request): bool;
/**
* Called when route is matched.
@@ -129,7 +129,7 @@ interface IRoute
* @param string $namespace
* @return static
*/
public function setDefaultNamespace($namespace): IRoute;
public function setDefaultNamespace(string $namespace): IRoute;
/**
* Get default namespace
@@ -196,7 +196,7 @@ interface IRoute
* @param string $middleware
* @return static
*/
public function addMiddleware($middleware): self;
public function addMiddleware(string $middleware): self;
/**
* Set middlewares array