@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function getPages(?string $pageClass = null): self |
36 | 36 | { |
37 | - return ! $pageClass ? $this : $this->filter(function (PageContract $page) use ($pageClass): bool { |
|
37 | + return !$pageClass ? $this : $this->filter(function(PageContract $page) use ($pageClass) : bool { |
|
38 | 38 | return $page instanceof $pageClass; |
39 | 39 | }); |
40 | 40 | } |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | |
63 | 63 | protected function discoverPagesFor(string $pageClass): void |
64 | 64 | { |
65 | - $this->parsePagesFor($pageClass)->each(function ($page) { |
|
65 | + $this->parsePagesFor($pageClass)->each(function($page) { |
|
66 | 66 | $this->discover($page); |
67 | 67 | }); |
68 | 68 | } |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | public function compileStaticPages(): void |
36 | 36 | { |
37 | - $this->getDiscoveredModels()->each(function (string $pageClass) { |
|
37 | + $this->getDiscoveredModels()->each(function(string $pageClass) { |
|
38 | 38 | $this->compilePagesForClass($pageClass); |
39 | 39 | }); |
40 | 40 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | |
61 | 61 | $this->withProgressBar( |
62 | 62 | $collection, |
63 | - function ($filepath) { |
|
63 | + function($filepath) { |
|
64 | 64 | copy($filepath, Hyde::getSiteOutputPath('media/'.basename($filepath))); |
65 | 65 | } |
66 | 66 | ); |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | protected function getDiscoveredModels(): RouteCollection |
74 | 74 | { |
75 | - return $this->router->getRoutes()->map(function (Route $route) { |
|
75 | + return $this->router->getRoutes()->map(function(Route $route) { |
|
76 | 76 | return $route->getPageType(); |
77 | 77 | })->unique(); |
78 | 78 | } |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | protected function compileRoute(): \Closure |
98 | 98 | { |
99 | - return function (Route $route) { |
|
99 | + return function(Route $route) { |
|
100 | 100 | return (new StaticPageBuilder($route->getSourceModel()))->__invoke(); |
101 | 101 | }; |
102 | 102 | } |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | |
109 | 109 | protected function isItSafeToCleanOutputDirectory(): bool |
110 | 110 | { |
111 | - if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
111 | + if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
112 | 112 | $this->info('Output directory will not be emptied.'); |
113 | 113 | |
114 | 114 | return false; |