@@ -30,11 +30,11 @@ discard block |
||
30 | 30 | /** @return array<string, DropdownNavItem> */ |
31 | 31 | public function getDropdowns(): array |
32 | 32 | { |
33 | - if (! $this->dropdownsEnabled()) { |
|
33 | + if (!$this->dropdownsEnabled()) { |
|
34 | 34 | throw new BadMethodCallException('Dropdowns are not enabled. Enable it by setting `hyde.navigation.subdirectories` to `dropdown`.'); |
35 | 35 | } |
36 | 36 | |
37 | - return $this->items->filter(function (NavItem $item): bool { |
|
37 | + return $this->items->filter(function(NavItem $item): bool { |
|
38 | 38 | return $item instanceof DropdownNavItem; |
39 | 39 | })->values()->all(); |
40 | 40 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | |
62 | 62 | protected function canAddRoute(Route $route): bool |
63 | 63 | { |
64 | - return parent::canAddRoute($route) && (! $route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName())); |
|
64 | + return parent::canAddRoute($route) && (!$route->getPage() instanceof DocumentationPage || $route->is(DocumentationPage::homeRouteName())); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | protected function canAddItemToDropdown(NavItem $item): bool |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | |
77 | 77 | private function hasGroupExplicitlySetInFrontMatter(): bool |
78 | 78 | { |
79 | - return $this->hasDropdowns ??= $this->items->contains(function (NavItem $item): bool { |
|
79 | + return $this->hasDropdowns ??= $this->items->contains(function(NavItem $item): bool { |
|
80 | 80 | return ($item->getGroup() !== null) && ($item->destination !== (string) DocumentationPage::home()); |
81 | 81 | }); |
82 | 82 | } |