From e91ca111233efcd5190386a0ba8b339e8bb394cb Mon Sep 17 00:00:00 2001 From: Mohammad Javad Asna Ashari Date: Sun, 29 Dec 2024 23:58:29 +0330 Subject: [PATCH] Refactor: Remove unreachable code after exception (#1271) --- src/Middleware/InitializeTenancyByPath.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Middleware/InitializeTenancyByPath.php b/src/Middleware/InitializeTenancyByPath.php index 6289199b3..3b6912597 100644 --- a/src/Middleware/InitializeTenancyByPath.php +++ b/src/Middleware/InitializeTenancyByPath.php @@ -40,10 +40,8 @@ public function handle(Request $request, Closure $next) return $this->initializeTenancy( $request, $next, $route ); - } else { - throw new RouteIsMissingTenantParameterException; } - return $next($request); + throw new RouteIsMissingTenantParameterException; } }