@@ -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 | ); |
@@ -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 | |
@@ -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 | |
@@ -65,14 +65,14 @@ |
||
| 65 | 65 | |
| 66 | 66 | protected function registerPreProcessor(string $class, bool $when = true): void |
| 67 | 67 | { |
| 68 | - if (! in_array($class, $this->preprocessors) && $when) { |
|
| 68 | + if (!in_array($class, $this->preprocessors) && $when) { |
|
| 69 | 69 | $this->preprocessors[] = $class; |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | 73 | protected function registerPostProcessor(string $class, bool $when = true): void |
| 74 | 74 | { |
| 75 | - if (! in_array($class, $this->postprocessors) && $when) { |
|
| 75 | + if (!in_array($class, $this->postprocessors) && $when) { |
|
| 76 | 76 | $this->postprocessors[] = $class; |
| 77 | 77 | } |
| 78 | 78 | } |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | echo "Short version: $shortVersion\n"; |
| 23 | 23 | $composerJson = json_decode(file_get_contents(__DIR__.'./../../packages/hyde/composer.json'), true); |
| 24 | 24 | $composerJson['require']['hyde/framework'] = "^0.$shortVersion"; |
| 25 | -file_put_contents(__DIR__.'./../../packages/hyde/composer.json', json_encode($composerJson, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)); |
|
| 25 | +file_put_contents(__DIR__.'./../../packages/hyde/composer.json', json_encode($composerJson, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES)); |
|
| 26 | 26 | |
| 27 | 27 | echo "Transforming upcoming release notes... \n"; |
| 28 | 28 | |
@@ -121,14 +121,14 @@ |
||
| 121 | 121 | |
| 122 | 122 | protected function validateType(string $pageClass): void |
| 123 | 123 | { |
| 124 | - if (! in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
| 124 | + if (!in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
| 125 | 125 | throw new UnsupportedPageTypeException('The page type must be either "markdown", "blade", or "documentation"'); |
| 126 | 126 | } |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | 129 | protected function failIfFileCannotBeSaved(string $path): void |
| 130 | 130 | { |
| 131 | - if (file_exists($path) && ! $this->force) { |
|
| 131 | + if (file_exists($path) && !$this->force) { |
|
| 132 | 132 | throw new FileConflictException($path); |
| 133 | 133 | } |
| 134 | 134 | } |