mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-15 18:23:26 +03:00
Removed unused variable.
This commit is contained in:
@@ -425,14 +425,11 @@ class SimpleRouter
|
||||
*/
|
||||
public static function error(Closure $callback): CallbackExceptionHandler
|
||||
{
|
||||
$routes = static::router()->getRoutes();
|
||||
|
||||
$callbackHandler = new CallbackExceptionHandler($callback);
|
||||
|
||||
$group = new RouteGroup();
|
||||
$group->addExceptionHandler($callbackHandler);
|
||||
|
||||
static::router()->addRoute($group);
|
||||
static::router()->addRoute(
|
||||
(new RouteGroup())->addExceptionHandler($callbackHandler)
|
||||
);
|
||||
|
||||
return $callbackHandler;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user