@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | { |
26 | 26 | return [ |
27 | 27 | 'title' => $this->getNavigationMenuTitle(), |
28 | - 'hidden' => ! $this->getNavigationMenuVisible(), |
|
28 | + 'hidden' => !$this->getNavigationMenuVisible(), |
|
29 | 29 | 'priority' => $this->getNavigationMenuPriority(), |
30 | 30 | ]; |
31 | 31 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | if ($this->page instanceof DocumentationPage) { |
63 | - return $this->page->identifier === 'index' && ! in_array('docs', config('hyde.navigation.exclude', [])); |
|
63 | + return $this->page->identifier === 'index' && !in_array('docs', config('hyde.navigation.exclude', [])); |
|
64 | 64 | } |
65 | 65 | |
66 | 66 | if ($this->page instanceof AbstractMarkdownPage) { |
@@ -49,7 +49,7 @@ |
||
49 | 49 | { |
50 | 50 | $orderIndexArray = config('docs.sidebar_order', []); |
51 | 51 | |
52 | - if (! in_array($this->identifier, $orderIndexArray)) { |
|
52 | + if (!in_array($this->identifier, $orderIndexArray)) { |
|
53 | 53 | return 500; |
54 | 54 | } |
55 | 55 |
@@ -38,11 +38,11 @@ |
||
38 | 38 | |
39 | 39 | protected function makeCanonicalUrl(): ?string |
40 | 40 | { |
41 | - if (! empty($this->matter('canonicalUrl'))) { |
|
41 | + if (!empty($this->matter('canonicalUrl'))) { |
|
42 | 42 | return $this->matter('canonicalUrl'); |
43 | 43 | } |
44 | 44 | |
45 | - if (Hyde::hasSiteUrl() && ! empty($this->identifier)) { |
|
45 | + if (Hyde::hasSiteUrl() && !empty($this->identifier)) { |
|
46 | 46 | return $this->getRoute()->getQualifiedUrl(); |
47 | 47 | } |
48 | 48 |
@@ -138,7 +138,7 @@ |
||
138 | 138 | |
139 | 139 | public function getLink(): string |
140 | 140 | { |
141 | - if (! $this->getSource()) { |
|
141 | + if (!$this->getSource()) { |
|
142 | 142 | return ''; |
143 | 143 | } |
144 | 144 |
@@ -67,7 +67,7 @@ |
||
67 | 67 | { |
68 | 68 | $path = Hyde::path('_media/'.$this->image->getSource()); |
69 | 69 | |
70 | - if (! file_exists($path)) { |
|
70 | + if (!file_exists($path)) { |
|
71 | 71 | $this->write(' > <comment>Warning:</comment> Could not find image file at '.$path.'!'); |
72 | 72 | $this->write(' <fg=gray> Using default content length of 0. '.'</>'); |
73 | 73 |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | return property_exists($this, $key) || $this->matter->has($key); |
129 | 129 | } |
130 | 130 | |
131 | - return ! blank($this->get($key)); |
|
131 | + return !blank($this->get($key)); |
|
132 | 132 | } |
133 | 133 | |
134 | 134 | /** @inheritDoc */ |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | |
184 | 184 | public function showInNavigation(): bool |
185 | 185 | { |
186 | - return ! $this->navigation['hidden']; |
|
186 | + return !$this->navigation['hidden']; |
|
187 | 187 | } |
188 | 188 | |
189 | 189 | public function navigationMenuPriority(): int |
@@ -16,7 +16,7 @@ |
||
16 | 16 | return '<link rel="'.e($this->rel).'" href="'.e($this->href).'">'; |
17 | 17 | } |
18 | 18 | |
19 | - $attributes = collect($this->attr)->map(function ($value, $key) { |
|
19 | + $attributes = collect($this->attr)->map(function($value, $key) { |
|
20 | 20 | return e($key).'="'.e($value).'"'; |
21 | 21 | })->implode(' '); |
22 | 22 |
@@ -12,8 +12,8 @@ discard block |
||
12 | 12 | /** @return $this */ |
13 | 13 | public function generate(): static |
14 | 14 | { |
15 | - RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function (Route $route) { |
|
16 | - if (! $route->getSourceModel()->get('hidden', false)) { |
|
15 | + RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function(Route $route) { |
|
16 | + if (!$route->getSourceModel()->get('hidden', false)) { |
|
17 | 17 | $this->items->push(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route))); |
18 | 18 | } |
19 | 19 | }); |
@@ -28,14 +28,14 @@ discard block |
||
28 | 28 | |
29 | 29 | public function getGroups(): array |
30 | 30 | { |
31 | - return $this->items->map(function (NavItem $item) { |
|
31 | + return $this->items->map(function(NavItem $item) { |
|
32 | 32 | return $item->getGroup(); |
33 | 33 | })->unique()->toArray(); |
34 | 34 | } |
35 | 35 | |
36 | 36 | public function getItemsInGroup(?string $group): Collection |
37 | 37 | { |
38 | - return $this->items->filter(function ($item) use ($group) { |
|
38 | + return $this->items->filter(function($item) use ($group) { |
|
39 | 39 | return $item->getGroup() === $group || $item->getGroup() === Str::slug($group); |
40 | 40 | })->sortBy('priority')->values(); |
41 | 41 | } |