Passed
Push — master ( b112da...71e718 )
by Caen
03:31
created
packages/framework/src/Models/DocumentationSidebar.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
 {
12 12
     public function generate(): self
13 13
     {
14
-        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function (Route $route) {
14
+        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function(Route $route) {
15 15
             $this->items->push(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)));
16 16
         });
17 17
 
@@ -20,28 +20,28 @@  discard block
 block discarded – undo
20 20
 
21 21
     public function hasGroups(): bool
22 22
     {
23
-        return $this->items->map(function (NavItem $item) {
23
+        return $this->items->map(function(NavItem $item) {
24 24
             return $item->getGroup() !== null;
25 25
         })->contains(true);
26 26
     }
27 27
 
28 28
     public function getGroups(): array
29 29
     {
30
-        return $this->items->map(function (NavItem $item) {
30
+        return $this->items->map(function(NavItem $item) {
31 31
             return $item->getGroup();
32 32
         })->unique()->toArray();
33 33
     }
34 34
 
35 35
     public function getItemsInGroup(?string $group): Collection
36 36
     {
37
-        return $this->items->filter(function ($item) use ($group) {
37
+        return $this->items->filter(function($item) use ($group) {
38 38
             return $item->getGroup() === $group || $item->getGroup() === Str::slug($group);
39 39
         })->sortBy('priority')->values();
40 40
     }
41 41
 
42 42
     protected function filterHiddenItems(): Collection
43 43
     {
44
-        return $this->items->reject(function (NavItem $item) {
44
+        return $this->items->reject(function(NavItem $item) {
45 45
             return $item->route->getSourceModel()->matter('hidden', false) || ($item->route->getRouteKey() === 'docs/index');
46 46
         })->values();
47 47
     }
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $orderIndexArray = config('docs.sidebar_order', []);
57 57
 
58
-        if (! in_array($slug, $orderIndexArray)) {
58
+        if (!in_array($slug, $orderIndexArray)) {
59 59
             return 500;
60 60
         }
61 61
 
Please login to merge, or discard this patch.
packages/framework/src/Services/DiscoveryService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public static function getSourceFileListForModel(string $model): array|false
134 134
     {
135
-        if (! class_exists($model) || ! is_subclass_of($model, AbstractPage::class)) {
135
+        if (!class_exists($model) || !is_subclass_of($model, AbstractPage::class)) {
136 136
             return false;
137 137
         }
138 138
 
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 
141 141
         $files = [];
142 142
         foreach (glob(Hyde::path($model::qualifyBasename('{*,**/*}')), GLOB_BRACE) as $filepath) {
143
-            if (! str_starts_with(basename($filepath), '_')) {
143
+            if (!str_starts_with(basename($filepath), '_')) {
144 144
                 $files[] = self::formatSlugForModel($model, $filepath);
145 145
             }
146 146
         }
Please login to merge, or discard this patch.