@@ -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 |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $route, |
52 | 52 | $route->getSourceModel()->navigationMenuTitle(), |
53 | 53 | $route->getSourceModel()->navigationMenuPriority(), |
54 | - ! $route->getSourceModel()->showInNavigation() |
|
54 | + !$route->getSourceModel()->showInNavigation() |
|
55 | 55 | ); |
56 | 56 | } |
57 | 57 | |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | $current = Hyde::currentRoute()->getSourceModel(); |
97 | 97 | } |
98 | 98 | |
99 | - if (! isset($this->route)) { |
|
99 | + if (!isset($this->route)) { |
|
100 | 100 | return ($current->getRoute()->getRouteKey() === $this->href) |
101 | 101 | || ($current->getRoute()->getRouteKey().'.html' === $this->href); |
102 | 102 | } |
@@ -73,7 +73,7 @@ |
||
73 | 73 | |
74 | 74 | public function failed(): bool |
75 | 75 | { |
76 | - return ! $this->passed; |
|
76 | + return !$this->passed; |
|
77 | 77 | } |
78 | 78 | |
79 | 79 | public function statusCode(): int |
@@ -14,7 +14,7 @@ |
||
14 | 14 | |
15 | 15 | protected function determineIfTorchlightAttributionShouldBeInjected(): bool |
16 | 16 | { |
17 | - return ! $this->isDocumentationPage() |
|
17 | + return !$this->isDocumentationPage() |
|
18 | 18 | && config('torchlight.attribution.enabled', true) |
19 | 19 | && str_contains($this->html, 'Syntax highlighted by torchlight.dev'); |
20 | 20 | } |