@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | |
| 55 | 55 | public function addExtension(string $extensionClassName): void |
| 56 | 56 | { |
| 57 | - if (! in_array($extensionClassName, $this->extensions)) { |
|
| 57 | + if (!in_array($extensionClassName, $this->extensions)) { |
|
| 58 | 58 | $this->extensions[] = $extensionClassName; |
| 59 | 59 | } |
| 60 | 60 | } |
@@ -156,7 +156,7 @@ discard block |
||
| 156 | 156 | |
| 157 | 157 | public function addFeature(string $feature): static |
| 158 | 158 | { |
| 159 | - if (! in_array($feature, $this->features)) { |
|
| 159 | + if (!in_array($feature, $this->features)) { |
|
| 160 | 160 | $this->features[] = $feature; |
| 161 | 161 | } |
| 162 | 162 | |
@@ -208,7 +208,7 @@ discard block |
||
| 208 | 208 | |
| 209 | 209 | protected function determineIfTorchlightAttributionShouldBeInjected(): bool |
| 210 | 210 | { |
| 211 | - return ! $this->isDocumentationPage() |
|
| 211 | + return !$this->isDocumentationPage() |
|
| 212 | 212 | && config('torchlight.attribution.enabled', true) |
| 213 | 213 | && str_contains($this->html, 'Syntax highlighted by torchlight.dev'); |
| 214 | 214 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | |
| 51 | 51 | protected function getCacheBustKey(string $file): string |
| 52 | 52 | { |
| 53 | - if (! config('hyde.cache_busting', true)) { |
|
| 53 | + if (!config('hyde.cache_busting', true)) { |
|
| 54 | 54 | return ''; |
| 55 | 55 | } |
| 56 | 56 | |
@@ -63,7 +63,7 @@ discard block |
||
| 63 | 63 | |
| 64 | 64 | public function check_documentation_site_has_an_index_page(Result $result): Result |
| 65 | 65 | { |
| 66 | - if (! Features::hasDocumentationPages()) { |
|
| 66 | + if (!Features::hasDocumentationPages()) { |
|
| 67 | 67 | return $result->skip('Does documentation site have an index page?') |
| 68 | 68 | ->withTip('Skipped because: The documentation page feature is disabled in config'); |
| 69 | 69 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | |
| 109 | 109 | public function check_a_torchlight_api_token_is_set(Result $result): Result |
| 110 | 110 | { |
| 111 | - if (! Features::enabled(Features::torchlight())) { |
|
| 111 | + if (!Features::enabled(Features::torchlight())) { |
|
| 112 | 112 | return $result->skip('Check a Torchlight API token is set') |
| 113 | 113 | ->withTip('Torchlight is an API for code syntax highlighting. You can enable it in the Hyde config.'); |
| 114 | 114 | } |
@@ -58,7 +58,7 @@ |
||
| 58 | 58 | { |
| 59 | 59 | /** @var \Hyde\Pages\DocumentationPage $page */ |
| 60 | 60 | foreach (DocumentationPage::all() as $page) { |
| 61 | - if (! in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 61 | + if (!in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 62 | 62 | $this->searchIndex->push( |
| 63 | 63 | $this->generatePageEntry($page) |
| 64 | 64 | ); |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | if (Features::hasDataCollections()) { |
| 27 | 27 | // Create the _data directory if it doesn't exist |
| 28 | - if (! is_dir(Hyde::path('_data'))) { |
|
| 28 | + if (!is_dir(Hyde::path('_data'))) { |
|
| 29 | 29 | mkdir(Hyde::path('_data')); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -55,6 +55,6 @@ |
||
| 55 | 55 | |
| 56 | 56 | public function hasWarnings(): bool |
| 57 | 57 | { |
| 58 | - return ! empty($this->warnings); |
|
| 58 | + return !empty($this->warnings); |
|
| 59 | 59 | } |
| 60 | 60 | } |
@@ -23,7 +23,7 @@ discard block |
||
| 23 | 23 | |
| 24 | 24 | protected function setSource(string $source): void |
| 25 | 25 | { |
| 26 | - if (! str_starts_with($source, '_media/')) { |
|
| 26 | + if (!str_starts_with($source, '_media/')) { |
|
| 27 | 27 | // Throwing an exception here ensures we have a super predictable state. |
| 28 | 28 | throw new InvalidArgumentException('LocalFeaturedImage source must start with _media/'); |
| 29 | 29 | } |
@@ -51,7 +51,7 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | protected function storageValidatedPath(): string |
| 53 | 53 | { |
| 54 | - if (! file_exists($this->storagePath())) { |
|
| 54 | + if (!file_exists($this->storagePath())) { |
|
| 55 | 55 | throw new FileNotFoundException("Image at $this->source does not exist"); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -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 | } |
@@ -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 | |