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

Group   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 3
Bugs 0 Features 0
Metric Value
c 3
b 0
f 0
dl 0
loc 40
wmc 3
lcom 0
cbo 1
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getMenu() 0 4 1
A getItem() 0 4 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
}