Completed
Push — master ( 15f051...29343b )
by Oleg
05:33
created

Group::item()   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
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
}