Completed
Push — master ( 3afbe4...79027c )
by Oleg
07:17
created
src/Contracts/Builder.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
      * @internal param string $name
24 24
      */
25 25
     function __construct(Container $container, Attributes $attributes, Attributes $activeAttributes,
26
-                         $type = self::UL, $view = null);
26
+                            $type = self::UL, $view = null);
27 27
 
28 28
     /**
29 29
      * @param string $name
Please login to merge, or discard this patch.
tests/stub/directory/view.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-Hello, <?php echo $menu;?> builder!
2 1
\ No newline at end of file
2
+Hello, <?php echo $menu; ?> builder!
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
tests/stub/text_element.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,1 +1,1 @@
 block discarded – undo
1
-<div<?php echo $attributes;?>><?php echo $text;?></div>
2 1
\ No newline at end of file
2
+<div<?php echo $attributes; ?>><?php echo $text; ?></div>
3 3
\ No newline at end of file
Please login to merge, or discard this patch.
tests/stub/another.php 2 patches
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,10 @@
 block discarded – undo
2 2
     <?php if ($menu) :?>
3 3
         <<?php echo $menu->getType() . $menu->buildAttributes();?>>
4 4
             <?php foreach ($menu->all() as $element) :?>
5
-                <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) $element = $element->build(); ?>
5
+                <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) {
6
+    $element = $element->build();
7
+}
8
+?>
6 9
                 <?php echo $element->render($renderView);?>
7 10
             <?php endforeach;?>
8 11
         </<?php echo $menu->getType();?>>
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <div class="div-menu">
2 2
     <?php if ($menu) :?>
3
-        <<?php echo $menu->getType() . $menu->buildAttributes();?>>
3
+        <<?php echo $menu->getType() . $menu->buildAttributes(); ?>>
4 4
             <?php foreach ($menu->all() as $element) :?>
5 5
                 <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) $element = $element->build(); ?>
6
-                <?php echo $element->render($renderView);?>
7
-            <?php endforeach;?>
8
-        </<?php echo $menu->getType();?>>
9
-    <?php endif;?>
6
+                <?php echo $element->render($renderView); ?>
7
+            <?php endforeach; ?>
8
+        </<?php echo $menu->getType(); ?>>
9
+    <?php endif; ?>
10 10
 </div>
11 11
\ No newline at end of file
Please login to merge, or discard this patch.
views/view.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,8 +1,8 @@
 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 4
             <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) $element = $element->build(); ?>
5
-            <?= $element->render($renderView);?>
6
-        <?php endforeach;?>
7
-    </<?= $menu->getType();?>>
8
-<?php endif;?>
9 5
\ No newline at end of file
6
+            <?= $element->render($renderView); ?>
7
+        <?php endforeach; ?>
8
+    </<?= $menu->getType(); ?>>
9
+<?php endif; ?>
10 10
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,7 +1,10 @@
 block discarded – undo
1 1
 <?php if ($menu) :?>
2 2
     <<?= $menu->getType() . $menu->buildAttributes();?>>
3 3
         <?php foreach ($menu->all() as $element) :?>
4
-            <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) $element = $element->build(); ?>
4
+            <?php if ($element instanceof \Malezha\Menu\Contracts\ElementFactory) {
5
+    $element = $element->build();
6
+}
7
+?>
5 8
             <?= $element->render($renderView);?>
6 9
         <?php endforeach;?>
7 10
     </<?= $menu->getType();?>>
Please login to merge, or discard this patch.
views/elements/submenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php if ($canDisplay) :?>
2
-<li<?=$attributes;?>>
3
-    <a href="<?=$url;?>"<?=$linkAttributes;?>><?=$title;?></a>
4
-    <?=$builder->render($renderView);?>
2
+<li<?=$attributes; ?>>
3
+    <a href="<?=$url; ?>"<?=$linkAttributes; ?>><?=$title; ?></a>
4
+    <?=$builder->render($renderView); ?>
5 5
 </li>
6
-<?php endif;?>
6
+<?php endif; ?>
Please login to merge, or discard this patch.
views/elements/link.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php if ($canDisplay) :?>
2
-<li<?=$attributes;?>><a href="<?=$url;?>"<?=$linkAttributes;?>><?=$title;?></a></li>
3
-<?php endif;?>
2
+<li<?=$attributes; ?>><a href="<?=$url; ?>"<?=$linkAttributes; ?>><?=$title; ?></a></li>
3
+<?php endif; ?>
Please login to merge, or discard this patch.
views/elements/text.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,3 +1,3 @@
 block discarded – undo
1 1
 <?php if ($canDisplay) :?>
2
-<li<?=$attributes;?>><?=$text;?></li>
3
-<?php endif;?>
2
+<li<?=$attributes; ?>><?=$text; ?></li>
3
+<?php endif; ?>
Please login to merge, or discard this patch.
src/Builder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -352,7 +352,7 @@
 block discarded – undo
352 352
     }
353 353
 
354 354
     /**
355
-     * @param $element
355
+     * @param string $element
356 356
      * @return ElementFactory
357 357
      * @throws \RuntimeException
358 358
      */
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@
 block discarded – undo
92 92
 
93 93
         $result = call_if_callable($callback, $factory);
94 94
 
95
-        if (! $result instanceof Element) {
95
+        if (!$result instanceof Element) {
96 96
             throw new \RuntimeException("Result of callback must be [" . Element::class . "]");
97 97
         }
98 98
 
Please login to merge, or discard this patch.