Completed
Push — refactoring ( 84ac1f...ab1ebc )
by Oleg
04:25
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 2
Bugs 0 Features 0
Metric Value
c 2
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 menu() 0 4 1
A item() 0 4 1
1
<?php
2
3
namespace Malezha\Menu\Entity;
4
5
use Malezha\Menu\Contracts\Builder as BuilderContract;
6
use Malezha\Menu\Traits\DisplayRule;
7
8
class Group
9
{
10
    use DisplayRule;
11
12
    /**
13
     * @var Item
14
     */
15
    protected $item;
16
17
    /**
18
     * @var BuilderContract
19
     */
20
    protected $menu;
21
22
    /**
23
     * @param BuilderContract $menu
24
     * @param Item $item
25
     */
26 2
    function __construct(BuilderContract $menu, Item $item)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
27
    {
28 2
        $this->menu = $menu;
29 2
        $this->item = $item;
30 2
    }
31
32
    /**
33
     * @return BuilderContract
34
     */
35 1
    public function menu()
36
    {
37 1
        return $this->menu;
38
    }
39
40
    /**
41
     * @return Item
42
     */
43 1
    public function item()
44
    {
45 1
        return $this->item;
46
    }
47
}