@@ -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 |
@@ -35,11 +35,11 @@ discard block |
||
35 | 35 | */ |
36 | 36 | public function handle(): int |
37 | 37 | { |
38 | - if (! $this->runPreflightCheck()) { |
|
38 | + if (!$this->runPreflightCheck()) { |
|
39 | 39 | return 1; |
40 | 40 | } |
41 | 41 | |
42 | - $this->action('Generating sitemap', function () { |
|
42 | + $this->action('Generating sitemap', function() { |
|
43 | 43 | file_put_contents( |
44 | 44 | Hyde::getSiteOutputPath('sitemap.xml'), |
45 | 45 | SitemapService::generateSitemap() |
@@ -51,17 +51,17 @@ discard block |
||
51 | 51 | |
52 | 52 | protected function runPreflightCheck(): bool |
53 | 53 | { |
54 | - if (! Features::sitemap()) { |
|
54 | + if (!Features::sitemap()) { |
|
55 | 55 | $this->error('Cannot generate sitemap.xml, please check your configuration.'); |
56 | 56 | |
57 | - if (! Hyde::hasSiteUrl()) { |
|
57 | + if (!Hyde::hasSiteUrl()) { |
|
58 | 58 | $this->warn('Hint: You don\'t have a site URL configured. Check config/hyde.php'); |
59 | 59 | } |
60 | 60 | if (config('site.generate_sitemap', true) !== true) { |
61 | 61 | $this->warn('Hint: You have disabled sitemap generation in config/hyde.php'); |
62 | 62 | $this->line(' > You can enable sitemap generation by setting <info>`site.generate_sitemap`</> to <info>`true`</>'); |
63 | 63 | } |
64 | - if (! extension_loaded('simplexml') || config('testing.mock_disabled_extensions', false) === true) { |
|
64 | + if (!extension_loaded('simplexml') || config('testing.mock_disabled_extensions', false) === true) { |
|
65 | 65 | $this->warn('Hint: You don\'t have the <info>`simplexml`</> extension installed. Check your PHP installation.'); |
66 | 66 | } |
67 | 67 |
@@ -35,13 +35,13 @@ |
||
35 | 35 | */ |
36 | 36 | public function handle(): int |
37 | 37 | { |
38 | - if (! Features::rss()) { |
|
38 | + if (!Features::rss()) { |
|
39 | 39 | $this->error('Cannot generate an RSS feed, please check your configuration.'); |
40 | 40 | |
41 | 41 | return 1; |
42 | 42 | } |
43 | 43 | |
44 | - $this->action('Generating RSS feed', function () { |
|
44 | + $this->action('Generating RSS feed', function() { |
|
45 | 45 | file_put_contents( |
46 | 46 | Hyde::getSiteOutputPath(RssFeedService::getDefaultOutputFilename()), |
47 | 47 | RssFeedService::generateFeed() |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use Hyde\Framework\Contracts\HydeKernelContract; |
4 | 4 | use Illuminate\Contracts\Support\Arrayable; |
5 | 5 | |
6 | -if (! function_exists('hyde')) { |
|
6 | +if (!function_exists('hyde')) { |
|
7 | 7 | /** |
8 | 8 | * Get the available HydeKernel instance. |
9 | 9 | * |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | -if (! function_exists('unslash')) { |
|
18 | +if (!function_exists('unslash')) { |
|
19 | 19 | /** |
20 | 20 | * Remove trailing slashes from the start and end of a string. |
21 | 21 | * |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | -if (! function_exists('array_map_unique')) { |
|
31 | +if (!function_exists('array_map_unique')) { |
|
32 | 32 | /** |
33 | 33 | * Map a callback over an array and remove duplicates. |
34 | 34 | * |