Passed
Branch master (00b4c1)
by Adel
04:40
created
src/LaravelMenu.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
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
         }
Please login to merge, or discard this patch.
src/ItemProcessors/ActiveMenuItemProcessor.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,8 +19,7 @@
 block discarded – undo
19 19
             {
20 20
                 $this->lastActiveItem = $item;
21 21
             }
22
-        }
23
-        else
22
+        } else
24 23
         {
25 24
             $item['active'] = false;
26 25
 
Please login to merge, or discard this patch.
src/Filters/TwoLevelAuthFilter.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,22 +20,22 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@
 block discarded – undo
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
                 }
Please login to merge, or discard this patch.
src/LaravelMenuServiceProvider.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.