From 9c0954e3052f70eeb62b9e54fcb390c930a6c893 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Wed, 20 Mar 2024 20:50:18 +0100 Subject: [PATCH] Inline variable --- .../Framework/Features/Navigation/DocumentationSidebar.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php b/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php index a788f745e91..1795a691f5c 100644 --- a/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php +++ b/packages/framework/src/Framework/Features/Navigation/DocumentationSidebar.php @@ -90,8 +90,6 @@ private function shouldIndexPageBeActive(string $group): bool return false; } - $firstGroupInSidebar = $this->getItems()->firstOrFail(); - - return $group === $firstGroupInSidebar->getGroupKey(); + return $group === $this->getItems()->firstOrFail()->getGroupKey(); } }