Completed
Push — master ( c21a7a...1d1dfc )
by
unknown
56:48 queued 54:39
created
src/Menu.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -174,8 +174,9 @@  discard block
 block discarded – undo
174 174
 
175 175
         $submenu = null;
176 176
 
177
-        if(!empty($this->submenu))
178
-            $submenu = $this->submenu;
177
+        if(!empty($this->submenu)) {
178
+                    $submenu = $this->submenu;
179
+        }
179 180
 
180 181
         $result = [
181 182
             'name' => $this->route,
@@ -189,8 +190,9 @@  discard block
 block discarded – undo
189 190
             'sub' => $submenu
190 191
         ];
191 192
 
192
-        if(empty($this->submenu))
193
-            unset($result['sub']);
193
+        if(empty($this->submenu)) {
194
+                    unset($result['sub']);
195
+        }
194 196
 
195 197
         return $result;
196 198
 
Please login to merge, or discard this patch.
src/SideNavHelpers.php 1 patch
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,8 +15,9 @@  discard block
 block discarded – undo
15 15
      * @return bool
16 16
      */
17 17
     function hasSub($menu){
18
-        if(! empty($menu['sub']))
19
-            return true;
18
+        if(! empty($menu['sub'])) {
19
+                    return true;
20
+        }
20 21
         return false;
21 22
     }
22 23
 }
@@ -31,8 +32,9 @@  discard block
 block discarded – undo
31 32
 
32 33
         $tag = $value['tag'];
33 34
 
34
-        if($value['tag'] === null)
35
-            $tag = 'i';
35
+        if($value['tag'] === null) {
36
+                    $tag = 'i';
37
+        }
36 38
 
37 39
         return '<' . $tag . ' class="' . $value['value'] . '"></' . $tag . '>';
38 40
     }
@@ -45,8 +47,9 @@  discard block
 block discarded – undo
45 47
      * @return null|string
46 48
      */
47 49
     function new_tab($newTab){
48
-        if($newTab)
49
-            return 'target="_blank"';
50
+        if($newTab) {
51
+                    return 'target="_blank"';
52
+        }
50 53
 
51 54
         return null;
52 55
     }
Please login to merge, or discard this patch.
src/SideNav.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -88,9 +88,10 @@  discard block
 block discarded – undo
88 88
         // make menu array
89 89
         $array = self::add($route,$callback);
90 90
 
91
-        if (self::checkGroupId(self::$group))
92
-            // add to the group render array
91
+        if (self::checkGroupId(self::$group)) {
92
+                    // add to the group render array
93 93
             array_push(self::$menu[self::$group], $array);
94
+        }
94 95
 
95 96
         // add to the single render array
96 97
         array_push(self::$menu, $array);
@@ -157,8 +158,9 @@  discard block
 block discarded – undo
157 158
      */
158 159
     public static function routes($index = null)
159 160
     {
160
-        if($index !== null)
161
-            return self::$routes[$index];
161
+        if($index !== null) {
162
+                    return self::$routes[$index];
163
+        }
162 164
 
163 165
         // return array of all routes-name
164 166
         return self::$routes;
@@ -185,8 +187,9 @@  discard block
 block discarded – undo
185 187
      */
186 188
     public static function checkGroupId($type)
187 189
     {
188
-        if($type !== null && isset(self::$group))
189
-            return true;
190
+        if($type !== null && isset(self::$group)) {
191
+                    return true;
192
+        }
190 193
 
191 194
         return false;
192 195
     }
@@ -202,8 +205,9 @@  discard block
 block discarded – undo
202 205
     public static function checkStatus($route,$callback = false)
203 206
     {
204 207
         if ($callback instanceof \Closure) {
205
-            if ($callback())
206
-                return true;
208
+            if ($callback()) {
209
+                            return true;
210
+            }
207 211
         }
208 212
 
209 213
         // check status class name
@@ -217,8 +221,9 @@  discard block
 block discarded – undo
217 221
             $class = new $obj;
218 222
 
219 223
             // call method of class
220
-            if ($class->$method($route))
221
-                return true;
224
+            if ($class->$method($route)) {
225
+                            return true;
226
+            }
222 227
             return false;
223 228
         } else {
224 229
             throw new \Exception("The CheckStatus class not found !");
Please login to merge, or discard this patch.