mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-07-10 19:52:08 +00:00
[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:
@@ -169,7 +169,7 @@ class SimpleRouter
|
||||
* @param int $httpCode
|
||||
* @return IRoute
|
||||
*/
|
||||
public static function redirect($where, $to, $httpCode = 301): IRoute
|
||||
public static function redirect(string $where, string $to, int $httpCode = 301): IRoute
|
||||
{
|
||||
return static::get($where, function () use ($to, $httpCode) {
|
||||
static::response()->redirect($to, $httpCode);
|
||||
|
||||
Reference in New Issue
Block a user