@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | { |
| 34 | 34 | public function getRoutes(?string $pageClass = null): self |
| 35 | 35 | { |
| 36 | - return ! $pageClass ? $this : $this->filter(function (RouteContract $route) use ($pageClass) { |
|
| 36 | + return !$pageClass ? $this : $this->filter(function(RouteContract $route) use ($pageClass) { |
|
| 37 | 37 | return $route->getSourceModel() instanceof $pageClass; |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | protected function runDiscovery(): self |
| 61 | 61 | { |
| 62 | - $this->kernel->pages()->each(function (PageContract $page) { |
|
| 62 | + $this->kernel->pages()->each(function(PageContract $page) { |
|
| 63 | 63 | $this->discover($page); |
| 64 | 64 | }); |
| 65 | 65 | |
@@ -36,12 +36,12 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public static function getSourceFileListForModel(string $model): array |
| 38 | 38 | { |
| 39 | - if (! class_exists($model) || ! is_subclass_of($model, AbstractPage::class)) { |
|
| 39 | + if (!class_exists($model) || !is_subclass_of($model, AbstractPage::class)) { |
|
| 40 | 40 | throw new UnsupportedPageTypeException($model); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $files = []; |
| 44 | - Hyde::files()->getSourceFiles($model)->each(function (File $file) use (&$files, $model) { |
|
| 44 | + Hyde::files()->getSourceFiles($model)->each(function(File $file) use (&$files, $model) { |
|
| 45 | 45 | $files[] = self::formatSlugForModel($model, $file->withoutDirectoryPrefix()); |
| 46 | 46 | }); |
| 47 | 47 | |
@@ -149,7 +149,7 @@ |
||
| 149 | 149 | |
| 150 | 150 | protected function needsToBeBooted(): void |
| 151 | 151 | { |
| 152 | - if (! $this->booted) { |
|
| 152 | + if (!$this->booted) { |
|
| 153 | 153 | $this->boot(); |
| 154 | 154 | } |
| 155 | 155 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | public static function needsDirectory(string $directory): void |
| 16 | 16 | { |
| 17 | - if (! file_exists($directory)) { |
|
| 17 | + if (!file_exists($directory)) { |
|
| 18 | 18 | mkdir($directory, recursive: true); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | { |
| 51 | 51 | /** @var DocumentationPage $page */ |
| 52 | 52 | foreach (DocumentationPage::all() as $page) { |
| 53 | - if (! in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 53 | + if (!in_array($page->identifier, config('docs.exclude_from_search', []))) { |
|
| 54 | 54 | $this->searchIndex->push( |
| 55 | 55 | $this->generatePageEntry($page) |
| 56 | 56 | ); |
@@ -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 |
@@ -2,7 +2,7 @@ discard block |
||
| 2 | 2 | |
| 3 | 3 | use Hyde\Framework\HydeKernel; |
| 4 | 4 | |
| 5 | -if (! function_exists('hyde')) { |
|
| 5 | +if (!function_exists('hyde')) { |
|
| 6 | 6 | /** |
| 7 | 7 | * Get the available HydeKernel instance. |
| 8 | 8 | * |
@@ -14,7 +14,7 @@ discard block |
||
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | -if (! function_exists('unslash')) { |
|
| 17 | +if (!function_exists('unslash')) { |
|
| 18 | 18 | /** |
| 19 | 19 | * Remove trailing slashes from the start and end of a string. |
| 20 | 20 | * |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | /* |
| 18 | 18 | * Enable auto-discovery. |
| 19 | 19 | */ |
| 20 | - $this->app->singleton(PackageManifest::class, function () { |
|
| 20 | + $this->app->singleton(PackageManifest::class, function() { |
|
| 21 | 21 | return new PackageManifest( |
| 22 | 22 | new Filesystem, |
| 23 | 23 | $this->basePath(), |
@@ -24,7 +24,7 @@ discard block |
||
| 24 | 24 | { |
| 25 | 25 | $path = static::path($filename); |
| 26 | 26 | |
| 27 | - if (! file_exists($path)) { |
|
| 27 | + if (!file_exists($path)) { |
|
| 28 | 28 | return $default; |
| 29 | 29 | } |
| 30 | 30 | |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | { |
| 37 | 37 | $path = static::path(basename($filename, '.md').'.md'); |
| 38 | 38 | |
| 39 | - if (! file_exists($path)) { |
|
| 39 | + if (!file_exists($path)) { |
|
| 40 | 40 | return $default === null ? null : Markdown::render($default); |
| 41 | 41 | } |
| 42 | 42 | |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | { |
| 49 | 49 | $path = static::path(basename($filename, '.blade.php').'.blade.php'); |
| 50 | 50 | |
| 51 | - if (! file_exists($path)) { |
|
| 51 | + if (!file_exists($path)) { |
|
| 52 | 52 | return $default === null ? null : Blade::render($default); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | |
| 58 | 58 | protected static function needsDirectory(string $directory): void |
| 59 | 59 | { |
| 60 | - if (! file_exists($directory)) { |
|
| 60 | + if (!file_exists($directory)) { |
|
| 61 | 61 | mkdir($directory, recursive: true); |
| 62 | 62 | } |
| 63 | 63 | } |