@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | { |
| 39 | 39 | public function getRoutes(?string $pageClass = null): self |
| 40 | 40 | { |
| 41 | - return ! $pageClass ? $this : $this->filter(function (Route $route) use ($pageClass): bool { |
|
| 41 | + return !$pageClass ? $this : $this->filter(function(Route $route) use ($pageClass) : bool { |
|
| 42 | 42 | return $route->getPage() instanceof $pageClass; |
| 43 | 43 | }); |
| 44 | 44 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | protected function runDiscovery(): self |
| 67 | 67 | { |
| 68 | - $this->kernel->pages()->each(function (HydePage $page): void { |
|
| 68 | + $this->kernel->pages()->each(function(HydePage $page): void { |
|
| 69 | 69 | $this->discover($page); |
| 70 | 70 | }); |
| 71 | 71 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | /* |
| 23 | 23 | * Enable auto-discovery. |
| 24 | 24 | */ |
| 25 | - $this->app->singleton(PackageManifest::class, function (): \Illuminate\Foundation\PackageManifest { |
|
| 25 | + $this->app->singleton(PackageManifest::class, function(): \Illuminate\Foundation\PackageManifest { |
|
| 26 | 26 | return new PackageManifest( |
| 27 | 27 | new Filesystem, |
| 28 | 28 | $this->basePath(), |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | |
| 39 | 39 | $this->app->singleton(AssetService::class, AssetService::class); |
| 40 | 40 | |
| 41 | - $this->app->singleton(MarkdownConverter::class, function (): \Hyde\Markdown\MarkdownConverter { |
|
| 41 | + $this->app->singleton(MarkdownConverter::class, function(): \Hyde\Markdown\MarkdownConverter { |
|
| 42 | 42 | return new MarkdownConverter(); |
| 43 | 43 | }); |
| 44 | 44 | |
@@ -40,7 +40,7 @@ discard block |
||
| 40 | 40 | |
| 41 | 41 | public function compileStaticPages(): void |
| 42 | 42 | { |
| 43 | - collect(Hyde::getDiscoveredPageTypes())->each(function (string $pageClass): void { |
|
| 43 | + collect(Hyde::getDiscoveredPageTypes())->each(function(string $pageClass): void { |
|
| 44 | 44 | $this->compilePagesForClass($pageClass); |
| 45 | 45 | }); |
| 46 | 46 | } |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | $this->needsDirectory(Hyde::sitePath('media')); |
| 63 | 63 | |
| 64 | 64 | $this->comment('Transferring Media Assets...'); |
| 65 | - $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function (string $filepath): void { |
|
| 65 | + $this->withProgressBar(DiscoveryService::getMediaAssetFiles(), function(string $filepath): void { |
|
| 66 | 66 | $sitePath = Hyde::sitePath('media/'.unslash(Str::after($filepath, Hyde::path('_media')))); |
| 67 | 67 | $this->needsParentDirectory($sitePath); |
| 68 | 68 | copy($filepath, $sitePath); |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | |
| 81 | 81 | $collection = $this->router->getRoutes($pageClass); |
| 82 | 82 | |
| 83 | - $this->withProgressBar($collection, function (Route $route): void { |
|
| 83 | + $this->withProgressBar($collection, function(Route $route): void { |
|
| 84 | 84 | (new StaticPageBuilder($route->getPage()))->__invoke(); |
| 85 | 85 | }); |
| 86 | 86 | |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | |
| 95 | 95 | protected function isItSafeToCleanOutputDirectory(): bool |
| 96 | 96 | { |
| 97 | - if (! $this->isOutputDirectoryWhitelisted() && ! $this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
| 97 | + if (!$this->isOutputDirectoryWhitelisted() && !$this->askIfUnsafeDirectoryShouldBeEmptied()) { |
|
| 98 | 98 | $this->info('Output directory will not be emptied.'); |
| 99 | 99 | |
| 100 | 100 | return false; |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | return ''; |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | - return sprintf(' %s', collect($this->attr)->map(function ($value, $key): string { |
|
| 38 | + return sprintf(' %s', collect($this->attr)->map(function($value, $key): string { |
|
| 39 | 39 | return e($key).'="'.e($value).'"'; |
| 40 | 40 | })->implode(' ')); |
| 41 | 41 | } |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | use Rector\Set\ValueObject\SetList; |
| 8 | 8 | use RectorLaravel\Set\LaravelSetList; |
| 9 | 9 | |
| 10 | -return static function (RectorConfig $rectorConfig): void { |
|
| 10 | +return static function(RectorConfig $rectorConfig): void { |
|
| 11 | 11 | $rectorConfig->paths([__DIR__.'/packages/framework/src']); |
| 12 | 12 | $rectorConfig->sets([ |
| 13 | 13 | LaravelSetList::LARAVEL_90, |
@@ -5,7 +5,7 @@ discard block |
||
| 5 | 5 | namespace { |
| 6 | 6 | use Hyde\Foundation\HydeKernel; |
| 7 | 7 | |
| 8 | - if (! function_exists('hyde')) { |
|
| 8 | + if (!function_exists('hyde')) { |
|
| 9 | 9 | /** |
| 10 | 10 | * Get the available HydeKernel instance. |
| 11 | 11 | */ |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | 17 | |
| 18 | - if (! function_exists('unslash')) { |
|
| 18 | + if (!function_exists('unslash')) { |
|
| 19 | 19 | /** |
| 20 | 20 | * Remove trailing slashes from the start and end of a string. |
| 21 | 21 | */ |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | namespace Hyde { |
| 30 | 30 | use Hyde\Foundation\HydeKernel; |
| 31 | 31 | |
| 32 | - if (! function_exists('\Hyde\hyde')) { |
|
| 32 | + if (!function_exists('\Hyde\hyde')) { |
|
| 33 | 33 | /** |
| 34 | 34 | * Get the available HydeKernel instance. |
| 35 | 35 | */ |
@@ -39,7 +39,7 @@ discard block |
||
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | |
| 42 | - if (! function_exists('\Hyde\unslash')) { |
|
| 42 | + if (!function_exists('\Hyde\unslash')) { |
|
| 43 | 43 | /** |
| 44 | 44 | * Remove trailing slashes from the start and end of a string. |
| 45 | 45 | */ |
@@ -49,28 +49,28 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - if (! function_exists('\Hyde\make_title')) { |
|
| 52 | + if (!function_exists('\Hyde\make_title')) { |
|
| 53 | 53 | function make_title(string $value): string |
| 54 | 54 | { |
| 55 | 55 | return hyde()->makeTitle($value); |
| 56 | 56 | } |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if (! function_exists('\Hyde\normalize_newlines')) { |
|
| 59 | + if (!function_exists('\Hyde\normalize_newlines')) { |
|
| 60 | 60 | function normalize_newlines(string $string): string |
| 61 | 61 | { |
| 62 | 62 | return hyde()->normalizeNewlines($string); |
| 63 | 63 | } |
| 64 | 64 | } |
| 65 | 65 | |
| 66 | - if (! function_exists('\Hyde\strip_newlines')) { |
|
| 66 | + if (!function_exists('\Hyde\strip_newlines')) { |
|
| 67 | 67 | function strip_newlines(string $string): string |
| 68 | 68 | { |
| 69 | 69 | return hyde()->stripNewlines($string); |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | - if (! function_exists('\Hyde\trim_slashes')) { |
|
| 73 | + if (!function_exists('\Hyde\trim_slashes')) { |
|
| 74 | 74 | function trim_slashes(string $string): string |
| 75 | 75 | { |
| 76 | 76 | return hyde()->trimSlashes($string); |