1 | <?php |
||
14 | class MenuManager implements Countable |
||
15 | { |
||
16 | /** |
||
17 | * The menus collection. |
||
18 | * |
||
19 | * @var \Illuminate\Support\Collection |
||
20 | */ |
||
21 | protected $menus; |
||
22 | |||
23 | /** |
||
24 | * The view factory. |
||
25 | * |
||
26 | * @var \Illuminate\Contracts\View\Factory |
||
27 | */ |
||
28 | protected $viewFactory; |
||
29 | |||
30 | /** |
||
31 | * The router instance. |
||
32 | * |
||
33 | * @var \Illuminate\Routing\Router |
||
34 | */ |
||
35 | protected $router; |
||
36 | |||
37 | /** |
||
38 | * The menu factory. |
||
39 | * |
||
40 | * @var \Rinvex\Menus\Models\MenuGenerator |
||
41 | */ |
||
42 | protected $generator; |
||
43 | |||
44 | /** |
||
45 | * The menu callbacks. |
||
46 | * |
||
47 | * @var array |
||
48 | */ |
||
49 | protected $callbacks = []; |
||
50 | |||
51 | /** |
||
52 | * The constructor. |
||
53 | * |
||
54 | * @param \Illuminate\Contracts\View\Factory $viewFactory |
||
55 | * @param \Illuminate\Routing\Router $router |
||
56 | */ |
||
57 | public function __construct(ViewFactory $viewFactory, Router $router) |
||
64 | |||
65 | /** |
||
66 | * Check if the menu exists. |
||
67 | * |
||
68 | * @param string $name |
||
69 | * |
||
70 | * @return bool |
||
71 | */ |
||
72 | public function has($name): bool |
||
76 | |||
77 | /** |
||
78 | * Get instance of the given menu if exists. |
||
79 | * |
||
80 | * @param string $name |
||
81 | * |
||
82 | * @return \Rinvex\Menus\Models\MenuGenerator|null |
||
83 | */ |
||
84 | public function instance($name): ?MenuGenerator |
||
88 | |||
89 | /** |
||
90 | * Register a menu. |
||
91 | * |
||
92 | * @param string $name |
||
93 | * @param \Closure $callback |
||
94 | * |
||
95 | * @return void |
||
96 | */ |
||
97 | public function register($name, Closure $callback): void |
||
111 | |||
112 | /** |
||
113 | * Render the menu tag by given name. |
||
114 | * |
||
115 | * @param string $name |
||
116 | * @param string $presenter |
||
117 | * @param array $bindings |
||
118 | * @param bool $specialSidebar |
||
119 | * |
||
120 | * @return string|null |
||
121 | */ |
||
122 | public function render(string $name, string $presenter = null, array $bindings = [], bool $specialSidebar = false): ?string |
||
145 | |||
146 | /** |
||
147 | * Get all menus. |
||
148 | * |
||
149 | * @return array |
||
150 | */ |
||
151 | public function all(): array |
||
155 | |||
156 | /** |
||
157 | * Get count from all menus. |
||
158 | * |
||
159 | * @return int |
||
160 | */ |
||
161 | public function count(): int |
||
165 | |||
166 | /** |
||
167 | * Empty the current menus. |
||
168 | */ |
||
169 | public function destroy() |
||
175 | } |
||
176 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..