NavbarRightPresenter::getMenuWithDropDownWrapper()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 13
Ratio 100 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 13
loc 13
ccs 0
cts 13
cp 0
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 1
crap 2
1
<?php
2
3
namespace Nwidart\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 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...
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