Passed
Pull Request — master (#5)
by Ivan
01:48
created

ParentNode   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 15
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getItem() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Everlution\Navigation\Builder;
6
7
use Everlution\Navigation\Item\ItemInterface;
8
9
/**
10
 * Class ParentNode.
11
 *
12
 * @author Ivan Barlog <[email protected]>
13
 */
14
class ParentNode extends RootNode
15
{
16
    /** @var ItemInterface */
17
    private $item;
18
19
    public function __construct(ItemInterface $item)
20
    {
21
        $this->item = $item;
22
    }
23
24
    public function getItem(): ItemInterface
25
    {
26
        return $this->item;
27
    }
28
}
29