Passed
Push — master ( 8a98a7...504233 )
by Kyle
13:16
created

NavbarRightPresenter   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 25
ccs 0
cts 8
cp 0
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getOpenTagWrapper() 0 3 1
A getMenuWithDropDownWrapper() 0 12 1
1
<?php
2
3
namespace KyleMassacre\Menus\Presenters\Bootstrap;
4
5
class NavbarRightPresenter extends NavbarPresenter
6
{
7
    /**
8
     * {@inheritdoc }.
9
     */
10
    public function getOpenTagWrapper()
11
    {
12
        return PHP_EOL . '<ul class="nav navbar-nav navbar-right">' . PHP_EOL;
13
    }
14
15
    /**
16
     * {@inheritdoc }.
17
     */
18
    public function getMenuWithDropDownWrapper($item)
19
    {
20
        return '<li class="dropdown pull-right">
21
			      <a href="#" class="dropdown-toggle" data-toggle="dropdown">
22
					' . $item->getIcon() . ' ' . $item->title . '
23
			      	<b class="caret"></b>
24
			      </a>
25
			      <ul class="dropdown-menu">
26
			      	' . $this->getChildMenuItems($item) . '
27
			      </ul>
28
		      	</li>'
29
        . PHP_EOL;
30
    }
31
}
32