Completed
Push — master ( 363ead...e52e2c )
by Oleg
06:33
created

Group::getItem()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 0
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
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 2
27
    /**
28 2
     * @param BuilderContract $menu
29 2
     * @param ItemContract $item
30 2
     */
31
    public function __construct(BuilderContract $menu, ItemContract $item)
32
    {
33
        $this->menu = $menu;
34
        $this->item = $item;
35 1
    }
36
37 1
    /**
38
     * @return BuilderContract
39
     */
40
    public function getMenu()
41
    {
42
        return $this->menu;
43 1
    }
44
45 1
    /**
46
     * @return ItemContract
47
     */
48
    public function getItem()
49
    {
50
        return $this->item;
51
    }
52
}