Passed
Push — master ( 89b281...a9270d )
by Caen
03:00 queued 12s
created
packages/framework/src/Models/DocumentationSidebar.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@  discard block
 block discarded – undo
12 12
     /** @return $this */
13 13
     public function generate(): static
14 14
     {
15
-        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function (Route $route) {
16
-            if (! $route->getSourceModel()->get('hidden', false)) {
17
-                $this->items->push(tap(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)), function (NavItem $item) {
15
+        RoutingService::getInstance()->getRoutesForModel(DocumentationPage::class)->each(function(Route $route) {
16
+            if (!$route->getSourceModel()->get('hidden', false)) {
17
+                $this->items->push(tap(NavItem::fromRoute($route)->setPriority($this->getPriorityForRoute($route)), function(NavItem $item) {
18 18
                     $item->title = $item->route->getSourceModel()->get('label');
19 19
                 }));
20 20
             }
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 
31 31
     public function getGroups(): array
32 32
     {
33
-        return $this->items->map(function (NavItem $item) {
33
+        return $this->items->map(function(NavItem $item) {
34 34
             return $item->getGroup();
35 35
         })->unique()->toArray();
36 36
     }
37 37
 
38 38
     public function getItemsInGroup(?string $group): Collection
39 39
     {
40
-        return $this->items->filter(function ($item) use ($group) {
40
+        return $this->items->filter(function($item) use ($group) {
41 41
             return $item->getGroup() === $group || $item->getGroup() === Str::slug($group);
42 42
         })->sortBy('priority')->values();
43 43
     }
Please login to merge, or discard this patch.