@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | { |
19 | 19 | protected function generate(): void |
20 | 20 | { |
21 | - Routes::getRoutes(DocumentationPage::class)->each(function (Route $route): void { |
|
21 | + Routes::getRoutes(DocumentationPage::class)->each(function(Route $route): void { |
|
22 | 22 | if ($this->canAddRoute($route)) { |
23 | 23 | $this->items->put($route->getRouteKey(), NavItem::fromRoute($route)); |
24 | 24 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | /** @return array<string> */ |
39 | 39 | public function getGroups(): array |
40 | 40 | { |
41 | - return $this->items->map(function (NavItem $item): string { |
|
41 | + return $this->items->map(function(NavItem $item): string { |
|
42 | 42 | return $item->getGroup(); |
43 | 43 | })->unique()->toArray(); |
44 | 44 | } |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | /** @return Collection<\Hyde\Framework\Features\Navigation\NavItem> */ |
47 | 47 | public function getItemsInGroup(?string $group): Collection |
48 | 48 | { |
49 | - return $this->items->filter(function (NavItem $item) use ($group): bool { |
|
49 | + return $this->items->filter(function(NavItem $item) use ($group) : bool { |
|
50 | 50 | return ($item->getGroup() === $group) || ($item->getGroup() === Hyde::makeSlug($group)); |
51 | 51 | })->sortBy('navigation.priority')->values(); |
52 | 52 | } |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | |
66 | 66 | protected function canAddRoute(Route $route): bool |
67 | 67 | { |
68 | - return parent::canAddRoute($route) && ! $route->is(DocumentationPage::homeRouteName()); |
|
68 | + return parent::canAddRoute($route) && !$route->is(DocumentationPage::homeRouteName()); |
|
69 | 69 | } |
70 | 70 | |
71 | 71 | private function isPageIndexPage(): bool |