@@ -66,7 +66,7 @@ |
||
66 | 66 | */ |
67 | 67 | public function getMenu(string $menuName): FilteredMenu |
68 | 68 | { |
69 | - if(array_key_exists($menuName, $this->filterResults)) |
|
69 | + if (array_key_exists($menuName, $this->filterResults)) |
|
70 | 70 | { |
71 | 71 | return $this->filterResults[$menuName]; |
72 | 72 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | { |
16 | 16 | $item['active'] = $item['active'](); |
17 | 17 | |
18 | - if($item['active']) |
|
18 | + if ($item['active']) |
|
19 | 19 | { |
20 | 20 | $this->lastActiveItem = $item; |
21 | 21 | } |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | { |
25 | 25 | $item['active'] = false; |
26 | 26 | |
27 | - if(array_key_exists('items', $item) && $this->lastActiveItem !== null) |
|
27 | + if (array_key_exists('items', $item) && $this->lastActiveItem !== null) |
|
28 | 28 | { |
29 | 29 | $item['activeParent'] = array_search($this->lastActiveItem, $item['items']) !== false; |
30 | 30 | } |
@@ -19,8 +19,7 @@ |
||
19 | 19 | { |
20 | 20 | $this->lastActiveItem = $item; |
21 | 21 | } |
22 | - } |
|
23 | - else |
|
22 | + } else |
|
24 | 23 | { |
25 | 24 | $item['active'] = false; |
26 | 25 |
@@ -20,22 +20,22 @@ |
||
20 | 20 | { |
21 | 21 | $res = []; |
22 | 22 | |
23 | - foreach($items as $item) |
|
23 | + foreach ($items as $item) |
|
24 | 24 | { |
25 | - if(!array_key_exists('auth', $item) || $item['auth']() === true) |
|
25 | + if (!array_key_exists('auth', $item) || $item['auth']() === true) |
|
26 | 26 | { |
27 | - if(array_key_exists('items', $item)) |
|
27 | + if (array_key_exists('items', $item)) |
|
28 | 28 | { |
29 | 29 | $newItems = []; |
30 | - foreach($item['items'] as $subItem) |
|
30 | + foreach ($item['items'] as $subItem) |
|
31 | 31 | { |
32 | - if(!array_key_exists('auth', $subItem) || $subItem['auth']() === true) |
|
32 | + if (!array_key_exists('auth', $subItem) || $subItem['auth']() === true) |
|
33 | 33 | { |
34 | 34 | $newItems[] = $this->itemProcessor->process($subItem); |
35 | 35 | } |
36 | 36 | } |
37 | 37 | |
38 | - if(count($newItems) > 0) |
|
38 | + if (count($newItems) > 0) |
|
39 | 39 | { |
40 | 40 | $item['items'] = $newItems; |
41 | 41 | $res[] = $this->itemProcessor->process($item); |
@@ -40,8 +40,7 @@ |
||
40 | 40 | $item['items'] = $newItems; |
41 | 41 | $res[] = $this->itemProcessor->process($item); |
42 | 42 | } |
43 | - } |
|
44 | - else |
|
43 | + } else |
|
45 | 44 | { |
46 | 45 | $res[] = $this->itemProcessor->process($item); |
47 | 46 | } |
@@ -21,8 +21,7 @@ |
||
21 | 21 | { |
22 | 22 | $menuPath = resource_path('menu/default.php'); |
23 | 23 | $templatePath = resource_path('views/menu/menu.blade.php'); |
24 | - } |
|
25 | - else |
|
24 | + } else |
|
26 | 25 | { |
27 | 26 | $menuPath = base_path('resources/menu/default.php'); |
28 | 27 | $templatePath = base_path('resources/views/menu/menu.blade.php'); |