Completed
Push — master ( e52e2c...9baf6c )
by Oleg
08:13
created

Group::getItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Malezha\Menu\Entity;
3
4
use Malezha\Menu\Contracts\Builder as BuilderContract;
5
use Malezha\Menu\Contracts\Group as GroupContract;
6
use Malezha\Menu\Contracts\Item as ItemContract;
7
use Malezha\Menu\Traits\DisplayRule;
8
9
/**
10
 * Class Group
11
 * @package Malezha\Menu\Entity
12
 */
13
class Group implements GroupContract
14
{
15
    use DisplayRule;
16
17
    /**
18
     * @var ItemContract
19
     */
20
    protected $item;
21
22
    /**
23
     * @var BuilderContract
24
     */
25
    protected $menu;
26
27
    /**
28
     * @param BuilderContract $menu
29
     * @param ItemContract $item
30
     */
31 2
    public function __construct(BuilderContract $menu, ItemContract $item)
32
    {
33 2
        $this->menu = $menu;
34 2
        $this->item = $item;
35 2
    }
36
37
    /**
38
     * @return BuilderContract
39
     */
40 1
    public function getMenu()
41
    {
42 1
        return $this->menu;
43
    }
44
45
    /**
46
     * @return ItemContract
47
     */
48 1
    public function getItem()
49
    {
50 1
        return $this->item;
51
    }
52
}