@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $this->isInstanceOf(MarkdownPost::class) |
| 95 | 95 | || $this->searchForHiddenInFrontMatter() |
| 96 | 96 | || in_array($this->routeKey, Config::getArray('hyde.navigation.exclude', ['404'])) |
| 97 | - || ! $this->isInstanceOf(DocumentationPage::class) && $this->pageIsInSubdirectory() && ($this->getSubdirectoryConfiguration() === 'hidden'); |
|
| 97 | + || !$this->isInstanceOf(DocumentationPage::class) && $this->pageIsInSubdirectory() && ($this->getSubdirectoryConfiguration() === 'hidden'); |
|
| 98 | 98 | } |
| 99 | 99 | |
| 100 | 100 | protected function makePriority(): int |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | |
| 196 | 196 | protected function invert(?bool $value): ?bool |
| 197 | 197 | { |
| 198 | - return $value === null ? null : ! $value; |
|
| 198 | + return $value === null ? null : !$value; |
|
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | protected function offset(?int $value, int $offset): ?int |
@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | protected static function validated(mixed $value, string $type, string $key): mixed |
| 45 | 45 | { |
| 46 | - if (! ("is_$type")($value)) { |
|
| 46 | + if (!("is_$type")($value)) { |
|
| 47 | 47 | throw new TypeError(sprintf('%s(): Config value %s must be of type %s, %s given', __METHOD__, $key, $type, gettype($value))); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -140,7 +140,7 @@ |
||
| 140 | 140 | */ |
| 141 | 141 | public function vendorPath(string $path = '', string $package = 'framework'): string |
| 142 | 142 | { |
| 143 | - if (PharSupport::running() && ! PharSupport::hasVendorDirectory()) { |
|
| 143 | + if (PharSupport::running() && !PharSupport::hasVendorDirectory()) { |
|
| 144 | 144 | return PharSupport::vendorPath($path, $package); |
| 145 | 145 | } |
| 146 | 146 | |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | |
| 126 | 126 | protected function validateType(string $pageClass): void |
| 127 | 127 | { |
| 128 | - if (! in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
| 128 | + if (!in_array($pageClass, [MarkdownPage::class, BladePage::class, DocumentationPage::class])) { |
|
| 129 | 129 | throw new UnsupportedPageTypeException('The page type must be either "markdown", "blade", or "documentation"'); |
| 130 | 130 | } |
| 131 | 131 | } |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | protected static function needsDirectory(string $directory): void |
| 20 | 20 | { |
| 21 | - if (! Filesystem::exists($directory)) { |
|
| 21 | + if (!Filesystem::exists($directory)) { |
|
| 22 | 22 | Filesystem::makeDirectory($directory, recursive: true); |
| 23 | 23 | } |
| 24 | 24 | } |
@@ -212,7 +212,7 @@ |
||
| 212 | 212 | { |
| 213 | 213 | $storagePath = Hyde::mediaPath($this->source); |
| 214 | 214 | |
| 215 | - if (! file_exists($storagePath)) { |
|
| 215 | + if (!file_exists($storagePath)) { |
|
| 216 | 216 | throw new FileNotFoundException(sprintf('Image at %s does not exist', Hyde::pathToRelative($storagePath))); |
| 217 | 217 | } |
| 218 | 218 | |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | protected static function needsKernel(): void |
| 15 | 15 | { |
| 16 | - if (! self::$hasSetUpKernel) { |
|
| 16 | + if (!self::$hasSetUpKernel) { |
|
| 17 | 17 | self::setupKernel(); |
| 18 | 18 | } |
| 19 | 19 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | return $this->__call('compile', []); |
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - if ($this->getBladeView() && ! $this->getContents()) { |
|
| 97 | + if ($this->getBladeView() && !$this->getContents()) { |
|
| 98 | 98 | if (str_ends_with($this->getBladeView(), '.blade.php')) { |
| 99 | 99 | // If the view key is for a Blade file path, we'll use the anonymous view compiler to compile it. |
| 100 | 100 | // This allows you to use any arbitrary file, without needing to register its namespace or directory. |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | */ |
| 133 | 133 | public function __call(string $method, array $parameters): mixed |
| 134 | 134 | { |
| 135 | - if (! $this->hasMacro($method)) { |
|
| 135 | + if (!$this->hasMacro($method)) { |
|
| 136 | 136 | throw new BadMethodCallException(sprintf( |
| 137 | 137 | 'Method %s::%s does not exist.', static::class, $method |
| 138 | 138 | )); |
@@ -29,14 +29,14 @@ |
||
| 29 | 29 | |
| 30 | 30 | public function headers(): array |
| 31 | 31 | { |
| 32 | - return array_map(function (string $key): string { |
|
| 32 | + return array_map(function(string $key): string { |
|
| 33 | 33 | return ucwords(str_replace('_', ' ', $key)); |
| 34 | 34 | }, array_keys($this->routes[0])); |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | 37 | protected function generate(): array |
| 38 | 38 | { |
| 39 | - return collect(Hyde::routes())->map(function (Route $route): array { |
|
| 39 | + return collect(Hyde::routes())->map(function(Route $route): array { |
|
| 40 | 40 | return $this->routeToListItem($route)->toArray(); |
| 41 | 41 | })->values()->toArray(); |
| 42 | 42 | } |