Completed
Push — master ( 363ead...e52e2c )
by Oleg
06:33
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 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
}