@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | |
42 | 42 | public function compileStaticPages(): void |
43 | 43 | { |
44 | - collect($this->getPageTypes())->each(function (string $pageClass): void { |
|
44 | + collect($this->getPageTypes())->each(function(string $pageClass): void { |
|
45 | 45 | $this->compilePagesForClass($pageClass); |
46 | 46 | }); |
47 | 47 | } |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->needsDirectory(Hyde::siteMediaPath()); |
52 | 52 | |
53 | 53 | $this->comment('Transferring Media Assets...'); |
54 | - $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function (string $filepath): void { |
|
54 | + $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function(string $filepath): void { |
|
55 | 55 | $sitePath = Hyde::siteMediaPath(Str::after($filepath, Hyde::mediaPath())); |
56 | 56 | $this->needsParentDirectory($sitePath); |
57 | 57 | copy($filepath, $sitePath); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | |
70 | 70 | $collection = Routes::getRoutes($pageClass); |
71 | 71 | |
72 | - $this->withProgressBar($collection, function (Route $route): void { |
|
72 | + $this->withProgressBar($collection, function(Route $route): void { |
|
73 | 73 | (new StaticPageBuilder($route->getPage()))->__invoke(); |
74 | 74 | }); |
75 | 75 | |
@@ -84,7 +84,7 @@ discard block |
||
84 | 84 | /** @return array<class-string<\Hyde\Pages\Concerns\HydePage>> */ |
85 | 85 | protected function getPageTypes(): array |
86 | 86 | { |
87 | - return Hyde::pages()->map(function (HydePage $page): string { |
|
87 | + return Hyde::pages()->map(function(HydePage $page): string { |
|
88 | 88 | return $page::class; |
89 | 89 | })->unique()->values()->toArray(); |
90 | 90 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public static function getPages(?string $pageClass = null): PageCollection |
24 | 24 | { |
25 | - return $pageClass ? static::getFacadeRoot()->filter(function (HydePage $page) use ($pageClass): bool { |
|
25 | + return $pageClass ? static::getFacadeRoot()->filter(function(HydePage $page) use ($pageClass) : bool { |
|
26 | 26 | return $page instanceof $pageClass; |
27 | 27 | }) : static::getFacadeRoot(); |
28 | 28 | } |
@@ -22,7 +22,7 @@ |
||
22 | 22 | |
23 | 23 | public static function getRoutes(?string $pageClass = null): RouteCollection |
24 | 24 | { |
25 | - return $pageClass ? static::getFacadeRoot()->filter(function (Route $route) use ($pageClass): bool { |
|
25 | + return $pageClass ? static::getFacadeRoot()->filter(function(Route $route) use ($pageClass) : bool { |
|
26 | 26 | return $route->getPage() instanceof $pageClass; |
27 | 27 | }) : static::getFacadeRoot(); |
28 | 28 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | |
45 | 45 | protected function runDiscovery(): void |
46 | 46 | { |
47 | - $this->kernel->files()->each(function (ProjectFile $file): void { |
|
47 | + $this->kernel->files()->each(function(ProjectFile $file): void { |
|
48 | 48 | if ($file instanceof SourceFile) { |
49 | 49 | $this->addPage($file->model::parse( |
50 | 50 | DiscoveryService::pathToIdentifier($file->model, $file->getPath()) |
@@ -65,7 +65,7 @@ |
||
65 | 65 | { |
66 | 66 | // Scan the source directory, and directories therein, for files that match the model's file extension. |
67 | 67 | foreach (glob($this->kernel->path($pageClass::sourcePath('{*,**/*}')), GLOB_BRACE) as $filepath) { |
68 | - if (! str_starts_with(basename((string) $filepath), '_')) { |
|
68 | + if (!str_starts_with(basename((string) $filepath), '_')) { |
|
69 | 69 | $this->addFile(SourceFile::make($filepath, $pageClass)); |
70 | 70 | } |
71 | 71 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | |
62 | 62 | protected function runDiscovery(): void |
63 | 63 | { |
64 | - $this->kernel->pages()->each(function (HydePage $page): void { |
|
64 | + $this->kernel->pages()->each(function(HydePage $page): void { |
|
65 | 65 | $this->addRoute(new Route($page)); |
66 | 66 | }); |
67 | 67 | } |