From ba5583523ffeacd36f7844777a8d10429b8922f5 Mon Sep 17 00:00:00 2001 From: Mark <14284867+xHeaven@users.noreply.github.com> Date: Sun, 29 Dec 2024 09:09:34 +0100 Subject: [PATCH] Simplify return --- src/Actions/CloneRoutesAsTenant.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Actions/CloneRoutesAsTenant.php b/src/Actions/CloneRoutesAsTenant.php index 70c277eb..86c3df9d 100644 --- a/src/Actions/CloneRoutesAsTenant.php +++ b/src/Actions/CloneRoutesAsTenant.php @@ -120,14 +120,8 @@ class CloneRoutesAsTenant $pathIdentificationUsed = (! $routeHasNonPathIdentificationMiddleware) && ($routeHasPathIdentificationMiddleware || $pathIdentificationMiddlewareInGlobalStack); - if ( - $pathIdentificationUsed && - (tenancy()->getRouteMode($route) === RouteMode::UNIVERSAL || tenancy()->routeHasMiddleware($route, 'clone')) - ) { - return true; - } - - return false; + return $pathIdentificationUsed && + (tenancy()->getRouteMode($route) === RouteMode::UNIVERSAL || tenancy()->routeHasMiddleware($route, 'clone')); }); }