Passed
Push — master ( 20e747...679572 )
by Ivan
01:59
created

PrefixedNavigationItem::getPrefix()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Everlution\Navigation;
6
7
use Everlution\Navigation\Extension\ManualMatch;
8
use Everlution\Navigation\Extension\ManualMatchExtension;
9
10
/**
11
 * Class PrefixedNavigationItem.
12
 * @author Ivan Barlog <[email protected]>
13
 */
14
class PrefixedNavigationItem extends NavigationItem implements PrefixableItem, ManualMatch
15
{
16
    use ManualMatchExtension;
17
18
    /** @var string */
19
    private $prefix;
20
21
    public function __construct(string $uri, string $label, string $regexPattern, Item $parent = null, array $children = [])
22
    {
23
        parent::__construct($uri, $label, $parent, $children);
24
25
        $this->prefix = $regexPattern;
26
    }
27
28
    public function getPrefix()
29
    {
30
        return $this->prefix;
31
    }
32
}
33