@@ -18,8 +18,8 @@ discard block |
||
18 | 18 | /** @return $this */ |
19 | 19 | public function generate(): static |
20 | 20 | { |
21 | - Router::getRoutes(DocumentationPage::class)->each(function (Route $route): void { |
|
22 | - $this->items->push(tap(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)), function (NavItem $item): void { |
|
21 | + Router::getRoutes(DocumentationPage::class)->each(function(Route $route): void { |
|
22 | + $this->items->push(tap(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)), function(NavItem $item): void { |
|
23 | 23 | $item->label = $item->route->getPage()->data('navigation.label'); |
24 | 24 | })); |
25 | 25 | }); |
@@ -34,14 +34,14 @@ discard block |
||
34 | 34 | |
35 | 35 | public function getGroups(): array |
36 | 36 | { |
37 | - return $this->items->map(function (NavItem $item): string { |
|
37 | + return $this->items->map(function(NavItem $item): string { |
|
38 | 38 | return $item->getGroup(); |
39 | 39 | })->unique()->toArray(); |
40 | 40 | } |
41 | 41 | |
42 | 42 | public function getItemsInGroup(?string $group): Collection |
43 | 43 | { |
44 | - return $this->items->filter(function (NavItem $item) use ($group): bool { |
|
44 | + return $this->items->filter(function(NavItem $item) use ($group) : bool { |
|
45 | 45 | return ($item->getGroup() === $group) || ($item->getGroup() === Str::slug($group)); |
46 | 46 | })->sortBy('navigation.priority')->values(); |
47 | 47 | } |
@@ -53,6 +53,6 @@ discard block |
||
53 | 53 | |
54 | 54 | protected function filterDocumentationPage(NavItem $item): bool |
55 | 55 | { |
56 | - return ! parent::filterDocumentationPage($item); |
|
56 | + return !parent::filterDocumentationPage($item); |
|
57 | 57 | } |
58 | 58 | } |