Completed
Push — master ( ed1f50...f8cfc8 )
by Alireza
02:09 queued 28s
created
src/SideNavHelpers.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     public static function hasSub($menu)
25 25
     {
26 26
         // check menu has sub
27
-        if(! empty($menu['sub'])) {
27
+        if (!empty($menu['sub'])) {
28 28
             return true;
29 29
         }
30 30
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 
45 45
         $tag = $value['tag'];
46 46
 
47
-        if($value['tag'] === null) {
47
+        if ($value['tag'] === null) {
48 48
             $tag = 'i';
49 49
         }
50 50
 
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public static function new_tab($newTab)
63 63
     {
64
-        if($newTab) {
64
+        if ($newTab) {
65 65
             return 'target="_blank"';
66 66
         }
67 67
 
Please login to merge, or discard this patch.
helpers.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(! function_exists('hasSub')){
3
+if (!function_exists('hasSub')) {
4 4
     /**
5 5
      * Check menu has sub
6 6
      *
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     function hasSub($menu)
13 13
     {
14 14
         // check menu has sub
15
-        if(! empty($menu['sub'])) {
15
+        if (!empty($menu['sub'])) {
16 16
             return true;
17 17
         }
18 18
 
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
     }
21 21
 }
22 22
 
23
-if(! function_exists('itemIcon')){
23
+if (!function_exists('itemIcon')) {
24 24
     /**
25 25
      * Print item icon
26 26
      *
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 
35 35
         $tag = $value['tag'];
36 36
 
37
-        if($value['tag'] === null) {
37
+        if ($value['tag'] === null) {
38 38
             $tag = 'i';
39 39
         }
40 40
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     }
43 43
 }
44 44
 
45
-if(! function_exists('newTab')){
45
+if (!function_exists('newTab')) {
46 46
     /**
47 47
      * Print item new_tab option
48 48
      *
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     function newTab($newTab)
55 55
     {
56
-        if($newTab) {
56
+        if ($newTab) {
57 57
             return 'target="_blank"';
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/SideNav.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
      * @param  $callback
101 101
      * @param  $checkCallback
102 102
      */
103
-    public static function registerWithCheck($route , $callback , $check)
103
+    public static function registerWithCheck($route, $callback, $check)
104 104
     {
105 105
         // check status of route
106 106
         if ($check()) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
      * @param  $callback
136 136
      * @return array
137 137
      */
138
-    private static function add($route,$callback)
138
+    private static function add($route, $callback)
139 139
     {
140 140
         // instance of menu class
141 141
         $menu = new Menu;
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
      */
157 157
     public static function routes($index = null)
158 158
     {
159
-        if($index !== null) {
159
+        if ($index !== null) {
160 160
             return self::$routes[$index];
161 161
         }
162 162
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
     public static function render($type = null)
177 177
     {
178 178
         // check $type was used
179
-        if(isset($type)) {
179
+        if (isset($type)) {
180 180
             // return group menu
181 181
             return self::$menu[$type];
182 182
         }
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
      */
195 195
     private static function checkGroupName($type)
196 196
     {
197
-        if($type !== null && isset(self::$group)) {
197
+        if ($type !== null && isset(self::$group)) {
198 198
             return true;
199 199
         }
200 200
 
Please login to merge, or discard this patch.
src/Menu.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      *
51 51
      * @var array
52 52
      */
53
-    private $icon = [ 'tag' => 'i', 'value' => null ];
53
+    private $icon = ['tag' => 'i', 'value' => null];
54 54
 
55 55
     /**
56 56
      * is_new icon option
@@ -110,10 +110,10 @@  discard block
 block discarded – undo
110 110
      * @param  $callback
111 111
      * @param  $checkCallback
112 112
      */
113
-    public function subWithCheck($route, $callback , $checkCallback)
113
+    public function subWithCheck($route, $callback, $checkCallback)
114 114
     {
115
-        if($checkCallback()) {
116
-            $this->sub($route,$callback);
115
+        if ($checkCallback()) {
116
+            $this->sub($route, $callback);
117 117
         }
118 118
     }
119 119
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 
280 280
         $submenu = [];
281 281
 
282
-        if(! empty($this->submenu)) {
282
+        if (!empty($this->submenu)) {
283 283
             $submenu = $this->submenu;
284 284
         }
285 285
 
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
             'sub' => $submenu
297 297
         ];
298 298
 
299
-        if(empty($this->submenu)) {
299
+        if (empty($this->submenu)) {
300 300
             unset($result['sub']);
301 301
         }
302 302
 
Please login to merge, or discard this patch.