@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | public function failed(): bool |
| 75 | 75 | { |
| 76 | - return ! $this->passed; |
|
| 76 | + return !$this->passed; |
|
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | public function statusCode(): int |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | |
| 15 | 15 | protected function determineIfTorchlightAttributionShouldBeInjected(): bool |
| 16 | 16 | { |
| 17 | - return ! $this->isDocumentationPage() |
|
| 17 | + return !$this->isDocumentationPage() |
|
| 18 | 18 | && config('torchlight.attribution.enabled', true) |
| 19 | 19 | && str_contains($this->html, 'Syntax highlighted by torchlight.dev'); |
| 20 | 20 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | |
| 18 | 18 | public function addFeature(string $feature): self |
| 19 | 19 | { |
| 20 | - if (! in_array($feature, $this->features)) { |
|
| 20 | + if (!in_array($feature, $this->features)) { |
|
| 21 | 21 | $this->features[] = $feature; |
| 22 | 22 | } |
| 23 | 23 | |
@@ -26,7 +26,7 @@ |
||
| 26 | 26 | if ($this->canRunBuildAction($collection, 'Media Assets', 'Transferring')) { |
| 27 | 27 | $this->withProgressBar( |
| 28 | 28 | $collection, |
| 29 | - function ($filepath) { |
|
| 29 | + function($filepath) { |
|
| 30 | 30 | copy($filepath, Hyde::getSiteOutputPath('media/'.basename($filepath))); |
| 31 | 31 | } |
| 32 | 32 | ); |
@@ -161,11 +161,11 @@ |
||
| 161 | 161 | */ |
| 162 | 162 | public static function copy(string $from, string $to, bool $force = false): bool|int |
| 163 | 163 | { |
| 164 | - if (! file_exists($from)) { |
|
| 164 | + if (!file_exists($from)) { |
|
| 165 | 165 | return 404; |
| 166 | 166 | } |
| 167 | 167 | |
| 168 | - if (file_exists($to) && ! $force) { |
|
| 168 | + if (file_exists($to) && !$force) { |
|
| 169 | 169 | return 409; |
| 170 | 170 | } |
| 171 | 171 | |
@@ -18,7 +18,7 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $this->assembleCategories(); |
| 20 | 20 | |
| 21 | - return ! empty($this->categories); |
|
| 21 | + return !empty($this->categories); |
|
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function getCategories(): array |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public function getItemsInCategory(string $category): DocumentationSidebar |
| 32 | 32 | { |
| 33 | - return $this->sidebar->filter(function ($item) use ($category) { |
|
| 33 | + return $this->sidebar->filter(function($item) use ($category) { |
|
| 34 | 34 | return $item->category === Str::slug($category); |
| 35 | 35 | })->sortBy('priority')->values(); |
| 36 | 36 | } |
@@ -39,13 +39,13 @@ discard block |
||
| 39 | 39 | { |
| 40 | 40 | foreach ($this->sidebar->sortItems() as $item) { |
| 41 | 41 | if (isset($item->category)) { |
| 42 | - if (! in_array($item->category, $this->categories)) { |
|
| 42 | + if (!in_array($item->category, $this->categories)) { |
|
| 43 | 43 | $this->categories[] = $item->category; |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if (! empty($this->categories)) { |
|
| 48 | + if (!empty($this->categories)) { |
|
| 49 | 49 | $this->setCategoryOfUncategorizedItems(); |
| 50 | 50 | } |
| 51 | 51 | } |
@@ -53,10 +53,10 @@ discard block |
||
| 53 | 53 | protected function setCategoryOfUncategorizedItems(): void |
| 54 | 54 | { |
| 55 | 55 | foreach ($this->sidebar as $item) { |
| 56 | - if (! isset($item->category)) { |
|
| 56 | + if (!isset($item->category)) { |
|
| 57 | 57 | $item->category = 'other'; |
| 58 | 58 | |
| 59 | - if (! in_array('other', $this->categories)) { |
|
| 59 | + if (!in_array('other', $this->categories)) { |
|
| 60 | 60 | $this->categories[] = 'other'; |
| 61 | 61 | } |
| 62 | 62 | } |
@@ -26,7 +26,7 @@ discard block |
||
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | if ($this instanceof DocumentationPage) { |
| 29 | - return $this->slug === 'index' && ! in_array('docs', config('hyde.navigation.exclude', [])); |
|
| 29 | + return $this->slug === 'index' && !in_array('docs', config('hyde.navigation.exclude', [])); |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | 32 | if ($this instanceof AbstractMarkdownPage) { |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | return config('hyde.navigation.labels.home', 'Home'); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if (isset($this->title) && ! blank($this->title)) { |
|
| 102 | + if (isset($this->title) && !blank($this->title)) { |
|
| 103 | 103 | return $this->title; |
| 104 | 104 | } |
| 105 | 105 | |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $filepath = $model::getSourceDirectory().'/'. |
| 24 | 24 | $slug.$model::getFileExtension(); |
| 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 | } |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | { |
| 16 | 16 | public function constructDynamicTitle(): void |
| 17 | 17 | { |
| 18 | - if (! isset($this->title) || $this->title === '') { |
|
| 18 | + if (!isset($this->title) || $this->title === '') { |
|
| 19 | 19 | $this->title = $this->findTitleForDocument(); |
| 20 | 20 | } |
| 21 | 21 | } |