@@ -43,7 +43,7 @@ |
||
| 43 | 43 | |
| 44 | 44 | public function execute(): bool|int |
| 45 | 45 | { |
| 46 | - if (! array_key_exists($this->selected, static::$options)) { |
|
| 46 | + if (!array_key_exists($this->selected, static::$options)) { |
|
| 47 | 47 | return 404; |
| 48 | 48 | } |
| 49 | 49 | |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | |
| 42 | 42 | public function execute(): bool|int |
| 43 | 43 | { |
| 44 | - if (! array_key_exists($this->selected, static::$homePages)) { |
|
| 44 | + if (!array_key_exists($this->selected, static::$homePages)) { |
|
| 45 | 45 | return 404; |
| 46 | 46 | } |
| 47 | 47 | |
@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | protected function fetchLocalImageInformation(): int |
| 66 | 66 | { |
| 67 | - if (! file_exists($this->image->getSource())) { |
|
| 67 | + if (!file_exists($this->image->getSource())) { |
|
| 68 | 68 | $this->write(' > <comment>Warning:</comment> Could not find image file at '.$this->image->getSource().'!'); |
| 69 | 69 | $this->write(' <fg=gray> Using default content length of 0. '.'</>'); |
| 70 | 70 | |
@@ -25,7 +25,7 @@ |
||
| 25 | 25 | { |
| 26 | 26 | if (Features::hasDataCollections()) { |
| 27 | 27 | // Create the _data directory if it doesn't exist |
| 28 | - if (! is_dir(Hyde::path('_data'))) { |
|
| 28 | + if (!is_dir(Hyde::path('_data'))) { |
|
| 29 | 29 | mkdir(Hyde::path('_data')); |
| 30 | 30 | } |
| 31 | 31 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | |
| 50 | 50 | public function processInput(): self |
| 51 | 51 | { |
| 52 | - $this->output = implode("\n", array_map(function ($line) { |
|
| 52 | + $this->output = implode("\n", array_map(function($line) { |
|
| 53 | 53 | return $this->expandShortcode($line); |
| 54 | 54 | }, explode("\n", $this->input))); |
| 55 | 55 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $lines = explode("\n", $markdown); |
| 13 | 13 | |
| 14 | 14 | foreach ($lines as $index => $line) { |
| 15 | - if (static::lineMatchesPattern($line) && ! str_contains($line, '{"shortcodes": false}')) { |
|
| 15 | + if (static::lineMatchesPattern($line) && !str_contains($line, '{"shortcodes": false}')) { |
|
| 16 | 16 | // Add the meta-block two lines before the pattern, placing it just above the code block. |
| 17 | 17 | // This prevents the meta-block from interfering with other processes. |
| 18 | 18 | $lines[$index - 2] .= sprintf( |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | public static function preprocess(string $markdown): string |
| 32 | 32 | { |
| 33 | - return implode("\n", array_map(function ($line) { |
|
| 33 | + return implode("\n", array_map(function($line) { |
|
| 34 | 34 | return str_starts_with(strtolower($line), strtolower('[Blade]:')) |
| 35 | 35 | ? '<!-- HYDE'.trim(htmlentities($line)).' -->' |
| 36 | 36 | : $line; |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | public function run(): self |
| 52 | 52 | { |
| 53 | - $this->output = implode("\n", array_map(function ($line) { |
|
| 53 | + $this->output = implode("\n", array_map(function($line) { |
|
| 54 | 54 | return $this->lineStartsWithDirective($line) |
| 55 | 55 | ? $this->processLine($line) |
| 56 | 56 | : $line; |
@@ -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 | } |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | $this->comment('Transferring Media Assets...'); |
| 60 | 60 | |
| 61 | 61 | $this->withProgressBar($collection, |
| 62 | - function ($filepath) { |
|
| 62 | + function($filepath) { |
|
| 63 | 63 | copy($filepath, Hyde::getSiteOutputPath('media/'.basename($filepath))); |
| 64 | 64 | } |
| 65 | 65 | ); |
@@ -68,7 +68,7 @@ discard block |
||
| 68 | 68 | |
| 69 | 69 | protected function getDiscoveredModels(): Collection |
| 70 | 70 | { |
| 71 | - return $this->router->getRoutes()->map(function (Route $route) { |
|
| 71 | + return $this->router->getRoutes()->map(function(Route $route) { |
|
| 72 | 72 | return $route->getPageType(); |
| 73 | 73 | })->unique(); |
| 74 | 74 | } |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | |
| 89 | 89 | protected function compileRoute(): \Closure |
| 90 | 90 | { |
| 91 | - return function (Route $route) { |
|
| 91 | + return function(Route $route) { |
|
| 92 | 92 | return (new StaticPageBuilder($route->getSourceModel()))->__invoke(); |
| 93 | 93 | }; |
| 94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | protected function isItSafeToCleanOutputDirectory(): bool |
| 102 | 102 | { |
| 103 | - if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
| 103 | + if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
| 104 | 104 | $this->info('Output directory will not be emptied.'); |
| 105 | 105 | |
| 106 | 106 | return false; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | |
| 32 | 32 | public function generate(): self |
| 33 | 33 | { |
| 34 | - Route::all()->each(function ($route) { |
|
| 34 | + Route::all()->each(function($route) { |
|
| 35 | 35 | $this->addRoute($route); |
| 36 | 36 | }); |
| 37 | 37 | |