From 063a85aa8979fa5780ba5622c9d9f395c2c159b3 Mon Sep 17 00:00:00 2001 From: Caen De Silva Date: Sat, 7 May 2022 14:13:21 +0200 Subject: [PATCH] Remove deprecated action --- src/Actions/GeneratesDocumentationSidebar.php | 54 ------------------- .../GeneratesDocumentationSidebarTest.php | 53 ------------------ 2 files changed, 107 deletions(-) delete mode 100644 src/Actions/GeneratesDocumentationSidebar.php delete mode 100644 tests/Feature/GeneratesDocumentationSidebarTest.php diff --git a/src/Actions/GeneratesDocumentationSidebar.php b/src/Actions/GeneratesDocumentationSidebar.php deleted file mode 100644 index 7c78b661..00000000 --- a/src/Actions/GeneratesDocumentationSidebar.php +++ /dev/null @@ -1,54 +0,0 @@ - $value) { - $orderArray[$key] = Str::slug($value); - } - - $array = []; - - foreach (CollectionService::getSourceFileListForModel(DocumentationPage::class) as $slug) { - if ($slug !== 'index') { - $order = array_search($slug, $orderArray) ?? 999; - - $array[] = [ - 'slug' => $slug, - 'title' => Hyde::titleFromSlug($slug), - 'active' => 'docs/'.$slug == $current, - 'order' => $order, - ]; - } - } - - krsort($array); - - usort($array, function ($a, $b) { - return $a['order'] <=> $b['order']; - }); - - return $array; - } -} diff --git a/tests/Feature/GeneratesDocumentationSidebarTest.php b/tests/Feature/GeneratesDocumentationSidebarTest.php deleted file mode 100644 index e3d3c444..00000000 --- a/tests/Feature/GeneratesDocumentationSidebarTest.php +++ /dev/null @@ -1,53 +0,0 @@ -assertIsArray($array); - $this->assertCount(3, $array); - } -}