Completed
Push — master ( e54ea7...7cecbb )
by Oleg
05:53
created
tests/BuilderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@
 block discarded – undo
180 180
         
181 181
         $builder = $this->builderFactory();
182 182
         $builder->create('index', 'Index Page', url('/'));
183
-        $builder->submenu('group', function(Item $item){}, function(Builder $menu) {
183
+        $builder->submenu('group', function(Item $item) {}, function(Builder $menu) {
184 184
             $menu->create('one', 'One', url('/one'));
185 185
         });
186 186
 
Please login to merge, or discard this patch.
tests/stub/another.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,18 +1,18 @@
 block discarded – undo
1 1
 <div class="div-menu">
2 2
     <?php if ($menu) :?>
3
-        <<?=$menu->getType() . $menu->buildAttributes();?>>
3
+        <<?=$menu->getType() . $menu->buildAttributes(); ?>>
4 4
             <?php foreach ($menu->all() as $element) :?>
5
-                <?php $isGroup = $element instanceof \Malezha\Menu\Contracts\SubMenu;?>
6
-                <?php if ($isGroup) $item = $element->getItem(); else $item = $element;?>
5
+                <?php $isGroup = $element instanceof \Malezha\Menu\Contracts\SubMenu; ?>
6
+                <?php if ($isGroup) $item = $element->getItem(); else $item = $element; ?>
7 7
                 <?php if ($item->canDisplay()) :?>
8
-                    <li<?=$item->buildAttributes();?>>
9
-                        <a href="<?=$item->getLink()->getUrl();?>"<?=$item->getLink()->buildAttributes();?>>
10
-                            <?=$item->getLink()->getTitle();?>
8
+                    <li<?=$item->buildAttributes(); ?>>
9
+                        <a href="<?=$item->getLink()->getUrl(); ?>"<?=$item->getLink()->buildAttributes(); ?>>
10
+                            <?=$item->getLink()->getTitle(); ?>
11 11
                         </a>
12
-                        <?php if ($isGroup) echo $element->getMenu()->render($renderView);?>
12
+                        <?php if ($isGroup) echo $element->getMenu()->render($renderView); ?>
13 13
                     </li>
14
-                <?php endif;?>
15
-            <?php endforeach;?>
16
-        </<?=$menu->getType();?>>
17
-    <?php endif;?>
14
+                <?php endif; ?>
15
+            <?php endforeach; ?>
16
+        </<?=$menu->getType(); ?>>
17
+    <?php endif; ?>
18 18
 </div>
19 19
\ No newline at end of file
Please login to merge, or discard this patch.
views/view.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php if ($menu) :?>
2
-    <<?=$menu->getType() . $menu->buildAttributes();?>>
2
+    <<?=$menu->getType() . $menu->buildAttributes(); ?>>
3 3
         <?php foreach ($menu->all() as $element) :?>
4
-            <?php $isGroup = $element instanceof \Malezha\Menu\Contracts\SubMenu;?>
5
-            <?php if ($isGroup) $item = $element->getItem(); else $item = $element;?>
4
+            <?php $isGroup = $element instanceof \Malezha\Menu\Contracts\SubMenu; ?>
5
+            <?php if ($isGroup) $item = $element->getItem(); else $item = $element; ?>
6 6
             <?php if ($item->canDisplay()) :?>
7
-                <li<?=$item->buildAttributes();?>>
8
-                    <a href="<?=$item->getLink()->getUrl();?>"<?=$item->getLink()->buildAttributes();?>>
9
-                        <?=$item->getLink()->getTitle();?>
7
+                <li<?=$item->buildAttributes(); ?>>
8
+                    <a href="<?=$item->getLink()->getUrl(); ?>"<?=$item->getLink()->buildAttributes(); ?>>
9
+                        <?=$item->getLink()->getTitle(); ?>
10 10
                     </a>
11
-                    <?php if ($isGroup) echo $element->getMenu()->render($renderView);?>
11
+                    <?php if ($isGroup) echo $element->getMenu()->render($renderView); ?>
12 12
                 </li>
13
-            <?php endif;?>
14
-        <?php endforeach;?>
15
-    </<?=$menu->getType();?>>
16
-<?php endif;?>
17 13
\ No newline at end of file
14
+            <?php endif; ?>
15
+        <?php endforeach; ?>
16
+    </<?=$menu->getType(); ?>>
17
+<?php endif; ?>
18 18
\ No newline at end of file
Please login to merge, or discard this patch.