@@ -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 | */ |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | use Hyde\Foundation\HydeKernel; |
31 | 31 | use Illuminate\Contracts\Support\Arrayable; |
32 | 32 | |
33 | - if (! function_exists('\Hyde\hyde')) { |
|
33 | + if (!function_exists('\Hyde\hyde')) { |
|
34 | 34 | /** |
35 | 35 | * Get the available HydeKernel instance. |
36 | 36 | */ |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | - if (! function_exists('\Hyde\unslash')) { |
|
43 | + if (!function_exists('\Hyde\unslash')) { |
|
44 | 44 | /** |
45 | 45 | * Remove trailing slashes from the start and end of a string. |
46 | 46 | */ |
@@ -50,35 +50,35 @@ discard block |
||
50 | 50 | } |
51 | 51 | } |
52 | 52 | |
53 | - if (! function_exists('\Hyde\make_title')) { |
|
53 | + if (!function_exists('\Hyde\make_title')) { |
|
54 | 54 | function make_title(string $value): string |
55 | 55 | { |
56 | 56 | return hyde()->makeTitle($value); |
57 | 57 | } |
58 | 58 | } |
59 | 59 | |
60 | - if (! function_exists('\Hyde\normalize_newlines')) { |
|
60 | + if (!function_exists('\Hyde\normalize_newlines')) { |
|
61 | 61 | function normalize_newlines(string $string): string |
62 | 62 | { |
63 | 63 | return hyde()->normalizeNewlines($string); |
64 | 64 | } |
65 | 65 | } |
66 | 66 | |
67 | - if (! function_exists('\Hyde\strip_newlines')) { |
|
67 | + if (!function_exists('\Hyde\strip_newlines')) { |
|
68 | 68 | function strip_newlines(string $string): string |
69 | 69 | { |
70 | 70 | return hyde()->stripNewlines($string); |
71 | 71 | } |
72 | 72 | } |
73 | 73 | |
74 | - if (! function_exists('\Hyde\trim_slashes')) { |
|
74 | + if (!function_exists('\Hyde\trim_slashes')) { |
|
75 | 75 | function trim_slashes(string $string): string |
76 | 76 | { |
77 | 77 | return hyde()->trimSlashes($string); |
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
81 | - if (! function_exists('\Hyde\evaluate_arrayable')) { |
|
81 | + if (!function_exists('\Hyde\evaluate_arrayable')) { |
|
82 | 82 | function evaluate_arrayable(array|Arrayable $array): array |
83 | 83 | { |
84 | 84 | return $array instanceof Arrayable ? $array->toArray() : $array; |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | */ |
69 | 69 | public function getDiscoveredPageTypes(): array |
70 | 70 | { |
71 | - return $this->pages()->map(function (HydePage $page): string { |
|
71 | + return $this->pages()->map(function(HydePage $page): string { |
|
72 | 72 | return $page::class; |
73 | 73 | })->unique()->values()->toArray(); |
74 | 74 | } |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | throw new BadMethodCallException('Cannot register a page class after the Kernel has been booted.'); |
96 | 96 | } |
97 | 97 | |
98 | - if (! is_subclass_of($pageClass, HydePage::class)) { |
|
98 | + if (!is_subclass_of($pageClass, HydePage::class)) { |
|
99 | 99 | throw new InvalidArgumentException('The specified class must be a subclass of HydePage.'); |
100 | 100 | } |
101 | 101 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | throw new InvalidArgumentException('The specified class must not be a subclass of DynamicPage.'); |
104 | 104 | } |
105 | 105 | |
106 | - if (! in_array($pageClass, $this->pageClasses, true)) { |
|
106 | + if (!in_array($pageClass, $this->pageClasses, true)) { |
|
107 | 107 | $this->pageClasses[] = $pageClass; |
108 | 108 | } |
109 | 109 | } |