@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public static function files(): array |
120 | 120 | { |
121 | - return Files::getFiles(static::class)->map(function (SourceFile $file): string { |
|
121 | + return Files::getFiles(static::class)->map(function(SourceFile $file): string { |
|
122 | 122 | return DiscoveryService::pathToIdentifier(static::class, $file->getPath()); |
123 | 123 | })->values()->toArray(); |
124 | 124 | } |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | |
324 | 324 | public function showInNavigation(): bool |
325 | 325 | { |
326 | - return ! $this->navigation['hidden']; |
|
326 | + return !$this->navigation['hidden']; |
|
327 | 327 | } |
328 | 328 | |
329 | 329 | public function navigationMenuPriority(): int |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | protected function runDiscovery(): void |
35 | 35 | { |
36 | - $this->kernel->files()->each(function (SourceFile $file): void { |
|
36 | + $this->kernel->files()->each(function(SourceFile $file): void { |
|
37 | 37 | $this->addPage($file->model::parse( |
38 | 38 | DiscoveryService::pathToIdentifier($file->model, $file->getPath()) |
39 | 39 | )); |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | */ |
60 | 60 | public function getPages(?string $pageClass = null): PageCollection |
61 | 61 | { |
62 | - return $pageClass ? $this->filter(function (HydePage $page) use ($pageClass): bool { |
|
62 | + return $pageClass ? $this->filter(function(HydePage $page) use ($pageClass) : bool { |
|
63 | 63 | return $page instanceof $pageClass; |
64 | 64 | }) : $this; |
65 | 65 | } |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | { |
54 | 54 | // Scan the source directory, and directories therein, for files that match the model's file extension. |
55 | 55 | foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) { |
56 | - if (! str_starts_with(basename((string) $filepath), '_')) { |
|
56 | + if (!str_starts_with(basename((string) $filepath), '_')) { |
|
57 | 57 | $this->addFile(SourceFile::make($filepath, $pageClass)); |
58 | 58 | } |
59 | 59 | } |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getFiles(?string $pageClass = null): FileCollection |
72 | 72 | { |
73 | - return $pageClass ? $this->filter(function (SourceFile $file) use ($pageClass): bool { |
|
73 | + return $pageClass ? $this->filter(function(SourceFile $file) use ($pageClass) : bool { |
|
74 | 74 | return $file->model === $pageClass; |
75 | 75 | }) : $this; |
76 | 76 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | protected function runDiscovery(): void |
34 | 34 | { |
35 | - $this->kernel->pages()->each(function (HydePage $page): void { |
|
35 | + $this->kernel->pages()->each(function(HydePage $page): void { |
|
36 | 36 | $this->addRoute(new Route($page)); |
37 | 37 | }); |
38 | 38 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function getRoutes(?string $pageClass = null): RouteCollection |
57 | 57 | { |
58 | - return $pageClass ? $this->filter(function (Route $route) use ($pageClass): bool { |
|
58 | + return $pageClass ? $this->filter(function(Route $route) use ($pageClass) : bool { |
|
59 | 59 | return $route->getPage() instanceof $pageClass; |
60 | 60 | }) : $this; |
61 | 61 | } |