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

UrlMenuItem::__construct()   A

Complexity

Conditions 2
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
nc 1
nop 4
dl 0
loc 8
rs 10
c 1
b 0
f 0
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
}