Completed
Push — master ( 2dffbe...813169 )
by Jose Luis
14:24
created

getMultiLevelDropdownWrapper()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 5

Duplication

Lines 13
Ratio 100 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
c 1
b 1
f 0
dl 13
loc 13
rs 9.4285
cc 1
eloc 5
nc 1
nop 1
1
<?php
2
3
namespace Hechoenlaravel\JarvisFoundation\Menu\Presenters;
4
5
use Pingpong\Menus\Presenters\Bootstrap\NavbarPresenter;
6
7
class SidebarMenuPresenter extends NavbarPresenter
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function getOpenTagWrapper()
13
    {
14
        return PHP_EOL . '<ul class="sidebar-menu">' . PHP_EOL;
15
    }
16
17
    /**
18
     * {@inheritdoc}
19
     */
20 View Code Duplication
    public function getMenuWithDropDownWrapper($item)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
21
    {
22
        return '
23
      		<li class="treeview' . $this->getActiveStateOnChild($item, ' active') . '">
24
                <a href="#">
25
                    ' . $item->getIcon() . '
26
                    <span>' . $item->title . '</span>
27
                    <i class="fa fa-angle-left pull-right"></i>
28
                </a>
29
                <ul class="treeview-menu">
30
                    ' . $this->getChildMenuItems($item) . '
31
                </ul>
32
            </li>';
33
    }
34
35
    /**
36
     * {@inheritdoc }.
37
     */
38
    public function getMenuWithoutDropdownWrapper($item)
39
    {
40
        return '<li'.$this->getActiveState($item).'><a href="'.$item->getUrl().'" '.$item->getAttributes().'>'.$item->getIcon().' <span>'.$item->title.'</span></a></li>'.PHP_EOL;
41
    }
42
43
    /**
44
     * {@inheritdoc }.
45
     */
46 View Code Duplication
    public function getMultiLevelDropdownWrapper($item)
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
47
    {
48
        return '<li class="'.$this->getActiveStateOnChild($item, ' active').'">
49
		          <a href="#">
50
					'.$item->getIcon().' '.$item->title.'
51
			      	<i class="fa fa-angle-left pull-right"></i>
52
			      </a>
53
			      <ul class="treeview-menu">
54
			      	'.$this->getChildMenuItems($item).'
55
			      </ul>
56
		      	</li>'
57
        .PHP_EOL;
58
    }
59
}
60