@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | { |
37 | 37 | $actionTime = microtime(true); |
38 | 38 | |
39 | - if (! $this->runPreflightCheck()) { |
|
39 | + if (!$this->runPreflightCheck()) { |
|
40 | 40 | return 1; |
41 | 41 | } |
42 | 42 | |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | |
50 | 50 | protected function runPreflightCheck(): bool |
51 | 51 | { |
52 | - if (! RssFeedService::canGenerateFeed()) { |
|
52 | + if (!RssFeedService::canGenerateFeed()) { |
|
53 | 53 | $this->error('Cannot generate an RSS feed, please check your configuration.'); |
54 | 54 | |
55 | 55 | return false; |
@@ -85,7 +85,7 @@ |
||
85 | 85 | |
86 | 86 | protected function canExistingIndexFileBeOverwritten(): bool |
87 | 87 | { |
88 | - if (! file_exists(Hyde::getBladePagePath('index.blade.php')) || $this->option('force')) { |
|
88 | + if (!file_exists(Hyde::getBladePagePath('index.blade.php')) || $this->option('force')) { |
|
89 | 89 | return true; |
90 | 90 | } |
91 | 91 |
@@ -66,7 +66,7 @@ |
||
66 | 66 | $this->line("Date: $creator->date"); |
67 | 67 | $this->line("Slug: $creator->slug"); |
68 | 68 | |
69 | - if (! $this->confirm('Do you wish to continue?', true)) { |
|
69 | + if (!$this->confirm('Do you wish to continue?', true)) { |
|
70 | 70 | $this->info('Aborting.'); |
71 | 71 | |
72 | 72 | return 130; |
@@ -17,7 +17,7 @@ |
||
17 | 17 | /* |
18 | 18 | * Enable auto-discovery. |
19 | 19 | */ |
20 | - $this->app->singleton(PackageManifest::class, function () { |
|
20 | + $this->app->singleton(PackageManifest::class, function() { |
|
21 | 21 | return new PackageManifest( |
22 | 22 | new Filesystem, |
23 | 23 | $this->basePath(), |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use Hyde\Framework\Hyde; |
4 | 4 | use Illuminate\Support\Collection; |
5 | 5 | |
6 | -if (! function_exists('hyde')) { |
|
6 | +if (!function_exists('hyde')) { |
|
7 | 7 | /** |
8 | 8 | * Get the Hyde facade class. |
9 | 9 | * |
@@ -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 | * |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | } |
29 | 29 | } |
30 | 30 | |
31 | -if (! function_exists('array_map_unique')) { |
|
31 | +if (!function_exists('array_map_unique')) { |
|
32 | 32 | /** |
33 | 33 | * Map a callback over an array and remove duplicates. |
34 | 34 | * |
@@ -33,7 +33,7 @@ |
||
33 | 33 | |
34 | 34 | public static function getBasePath(): string |
35 | 35 | { |
36 | - if (! isset(static::$basePath)) { |
|
36 | + if (!isset(static::$basePath)) { |
|
37 | 37 | static::$basePath = getcwd(); |
38 | 38 | } |
39 | 39 |
@@ -38,11 +38,11 @@ discard block |
||
38 | 38 | |
39 | 39 | public function generate(): self |
40 | 40 | { |
41 | - RoutingService::getInstance()->getRoutes()->each(function (Route $route) { |
|
41 | + RoutingService::getInstance()->getRoutes()->each(function(Route $route) { |
|
42 | 42 | $this->items->push(NavItem::fromRoute($route)); |
43 | 43 | }); |
44 | 44 | |
45 | - collect(config('hyde.navigation.custom', []))->each(function (NavItem $item) { |
|
45 | + collect(config('hyde.navigation.custom', []))->each(function(NavItem $item) { |
|
46 | 46 | $this->items->push($item); |
47 | 47 | }); |
48 | 48 | |
@@ -52,12 +52,12 @@ discard block |
||
52 | 52 | public function filter(): self |
53 | 53 | { |
54 | 54 | // Remove hidden items |
55 | - $this->items = $this->items->reject(function (NavItem $item) { |
|
55 | + $this->items = $this->items->reject(function(NavItem $item) { |
|
56 | 56 | return $item->hidden; |
57 | 57 | })->values(); |
58 | 58 | |
59 | 59 | // Remove duplicate items |
60 | - $this->items = $this->items->unique(function (NavItem $item) { |
|
60 | + $this->items = $this->items->unique(function(NavItem $item) { |
|
61 | 61 | return $item->resolveLink(); |
62 | 62 | }); |
63 | 63 |
@@ -98,7 +98,7 @@ |
||
98 | 98 | /** @inheritDoc */ |
99 | 99 | public static function getFromSource(string $sourceFilePath): static |
100 | 100 | { |
101 | - return RoutingService::getInstance()->getRoutes()->first(function (RouteContract $route) use ($sourceFilePath) { |
|
101 | + return RoutingService::getInstance()->getRoutes()->first(function(RouteContract $route) use ($sourceFilePath) { |
|
102 | 102 | return $route->getSourceFilePath() === $sourceFilePath; |
103 | 103 | }) ?? throw new RouteNotFoundException($sourceFilePath); |
104 | 104 | } |
@@ -33,7 +33,7 @@ |
||
33 | 33 | { |
34 | 34 | $orderIndexArray = config('docs.sidebar_order', []); |
35 | 35 | |
36 | - if (! in_array($slug, $orderIndexArray)) { |
|
36 | + if (!in_array($slug, $orderIndexArray)) { |
|
37 | 37 | return 500; |
38 | 38 | } |
39 | 39 |