Passed
Push — main ( 11cd55...a13e4a )
by Michael
11:21
created

UrlMenuItem   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 2
1
<?php
2
3
namespace Braunstetter\MenuBundle\Items;
4
5
6
final class UrlMenuItem extends MenuItem
7
{
8
9
    public function __construct(string $label, string $url, ?string $target, ?string $icon)
10
    {
11
        parent::__construct($label, $icon);
12
13
        $this->url = $url;
14
        $this->target = $target ?: '_self';
15
16
        $this->setType(MenuItem::TYPE_URL);
17
    }
18
19
}