1 | <?php |
||
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) |
|
31 | |||
32 | /** |
||
33 | * @return BuilderContract |
||
34 | */ |
||
35 | 1 | public function menu() |
|
39 | |||
40 | /** |
||
41 | * @return Item |
||
42 | */ |
||
43 | 1 | public function item() |
|
47 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.