1 | <?php |
||
15 | class MenuManager implements Countable |
||
16 | { |
||
17 | /** |
||
18 | * The menus collection. |
||
19 | * |
||
20 | * @var \Illuminate\Support\Collection |
||
21 | */ |
||
22 | protected $menus; |
||
23 | |||
24 | /** |
||
25 | * The view factory. |
||
26 | * |
||
27 | * @var \Illuminate\Contracts\View\Factory |
||
28 | */ |
||
29 | protected $viewFactory; |
||
30 | |||
31 | /** |
||
32 | * The router instance. |
||
33 | * |
||
34 | * @var \Illuminate\Routing\Router |
||
35 | */ |
||
36 | protected $router; |
||
37 | |||
38 | /** |
||
39 | * The menu factory. |
||
40 | * |
||
41 | * @var \Rinvex\Menus\Models\MenuGenerator |
||
42 | */ |
||
43 | protected $generator; |
||
44 | |||
45 | /** |
||
46 | * The menu callbacks. |
||
47 | * |
||
48 | * @var array |
||
49 | */ |
||
50 | protected $callbacks = []; |
||
51 | |||
52 | /** |
||
53 | * The constructor. |
||
54 | * |
||
55 | * @param \Illuminate\Contracts\View\Factory $viewFactory |
||
56 | * @param \Illuminate\Routing\Router $router |
||
57 | */ |
||
58 | public function __construct(ViewFactory $viewFactory, Router $router) |
||
65 | |||
66 | /** |
||
67 | * Check if the menu exists. |
||
68 | * |
||
69 | * @param string $name |
||
70 | * |
||
71 | * @return bool |
||
72 | */ |
||
73 | public function has($name): bool |
||
77 | |||
78 | /** |
||
79 | * Get instance of the given menu if exists. |
||
80 | * |
||
81 | * @param string $name |
||
82 | * |
||
83 | * @return \Rinvex\Menus\Models\MenuGenerator|null |
||
84 | */ |
||
85 | public function instance($name): ?MenuGenerator |
||
89 | |||
90 | /** |
||
91 | * Register a menu. |
||
92 | * |
||
93 | * @param string $name |
||
94 | * @param \Closure $callback |
||
95 | * |
||
96 | * @return void |
||
97 | */ |
||
98 | public function register($name, Closure $callback): void |
||
112 | |||
113 | /** |
||
114 | * Render the menu tag by given name. |
||
115 | * |
||
116 | * @param string $name |
||
117 | * @param string $presenter |
||
118 | * @param array $bindings |
||
119 | * @param bool $specialSidebar |
||
120 | * |
||
121 | * @return string|null |
||
122 | */ |
||
123 | 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..