@@ -31,11 +31,11 @@ discard block |
||
31 | 31 | /** @return $this */ |
32 | 32 | public function generate(): static |
33 | 33 | { |
34 | - Hyde::routes()->each(function (Route $route) { |
|
34 | + Hyde::routes()->each(function(Route $route) { |
|
35 | 35 | $this->items->push(NavItem::fromRoute($route)); |
36 | 36 | }); |
37 | 37 | |
38 | - collect(config('hyde.navigation.custom', []))->each(function (NavItem $item) { |
|
38 | + collect(config('hyde.navigation.custom', []))->each(function(NavItem $item) { |
|
39 | 39 | $this->items->push($item); |
40 | 40 | }); |
41 | 41 | |
@@ -61,14 +61,14 @@ discard block |
||
61 | 61 | |
62 | 62 | protected function filterHiddenItems(): Collection |
63 | 63 | { |
64 | - return $this->items->reject(function (NavItem $item) { |
|
64 | + return $this->items->reject(function(NavItem $item) { |
|
65 | 65 | return $item->hidden || $this->filterDocumentationPage($item); |
66 | 66 | })->values(); |
67 | 67 | } |
68 | 68 | |
69 | 69 | protected function filterDuplicateItems(): Collection |
70 | 70 | { |
71 | - return $this->items->unique(function (NavItem $item) { |
|
71 | + return $this->items->unique(function(NavItem $item) { |
|
72 | 72 | return $item->resolveLink(); |
73 | 73 | }); |
74 | 74 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $route, |
56 | 56 | $route->getPage()->navigationMenuLabel(), |
57 | 57 | $route->getPage()->navigationMenuPriority(), |
58 | - ! $route->getPage()->showInNavigation() |
|
58 | + !$route->getPage()->showInNavigation() |
|
59 | 59 | ); |
60 | 60 | } |
61 | 61 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $current = Hyde::currentRoute()->getPage(); |
101 | 101 | } |
102 | 102 | |
103 | - if (! isset($this->route)) { |
|
103 | + if (!isset($this->route)) { |
|
104 | 104 | return ($current->getRoute()->getRouteKey() === $this->href) |
105 | 105 | || ($current->getRoute()->getRouteKey().'.html' === $this->href); |
106 | 106 | } |
@@ -46,7 +46,7 @@ |
||
46 | 46 | // Reject any metadata from the global metadata bag that is already present in the page metadata bag. |
47 | 47 | |
48 | 48 | foreach (['links', 'metadata', 'properties', 'generics'] as $type) { |
49 | - $global->$type = array_filter($global->$type, fn ($meta) => ! in_array($meta->uniqueKey(), |
|
49 | + $global->$type = array_filter($global->$type, fn ($meta) => !in_array($meta->uniqueKey(), |
|
50 | 50 | array_map(fn ($meta) => $meta->uniqueKey(), $page->metadata->$type) |
51 | 51 | )); |
52 | 52 | } |
@@ -31,7 +31,7 @@ |
||
31 | 31 | return ''; |
32 | 32 | } |
33 | 33 | |
34 | - return sprintf(' %s', collect($this->attr)->map(function ($value, $key) { |
|
34 | + return sprintf(' %s', collect($this->attr)->map(function($value, $key) { |
|
35 | 35 | return e($key).'="'.e($value).'"'; |
36 | 36 | })->implode(' ')); |
37 | 37 | } |
@@ -141,7 +141,7 @@ |
||
141 | 141 | $string = trim($string); |
142 | 142 | |
143 | 143 | // Check if string is an array |
144 | - if (! static::isValueArrayString($string)) { |
|
144 | + if (!static::isValueArrayString($string)) { |
|
145 | 145 | throw new RuntimeException('Failed parsing BladeMatter array. Input string must follow array syntax.'); |
146 | 146 | } |
147 | 147 |
@@ -43,7 +43,7 @@ |
||
43 | 43 | |
44 | 44 | public function execute(): bool|int |
45 | 45 | { |
46 | - if (! array_key_exists($this->selected, static::$options)) { |
|
46 | + if (!array_key_exists($this->selected, static::$options)) { |
|
47 | 47 | return 404; |
48 | 48 | } |
49 | 49 |
@@ -41,7 +41,7 @@ |
||
41 | 41 | |
42 | 42 | public function execute(): bool|int |
43 | 43 | { |
44 | - if (! array_key_exists($this->selected, static::$homePages)) { |
|
44 | + if (!array_key_exists($this->selected, static::$homePages)) { |
|
45 | 45 | return 404; |
46 | 46 | } |
47 | 47 |
@@ -93,11 +93,11 @@ |
||
93 | 93 | |
94 | 94 | private function getCanonicalUrl(): ?string |
95 | 95 | { |
96 | - if (! empty($this->matter('canonicalUrl'))) { |
|
96 | + if (!empty($this->matter('canonicalUrl'))) { |
|
97 | 97 | return $this->matter('canonicalUrl'); |
98 | 98 | } |
99 | 99 | |
100 | - if (Hyde::hasSiteUrl() && ! empty($this->identifier)) { |
|
100 | + if (Hyde::hasSiteUrl() && !empty($this->identifier)) { |
|
101 | 101 | return Hyde::url($this->outputPath); |
102 | 102 | } |
103 | 103 |
@@ -23,7 +23,7 @@ |
||
23 | 23 | $filepath = $model::sourceDirectory().'/'. |
24 | 24 | $slug.$model::fileExtension(); |
25 | 25 | |
26 | - if (! file_exists(Hyde::path($filepath))) { |
|
26 | + if (!file_exists(Hyde::path($filepath))) { |
|
27 | 27 | throw new FileNotFoundException($filepath); |
28 | 28 | } |
29 | 29 | } |