1 | <?php |
||
15 | class BasicNavigation implements Navigation |
||
16 | { |
||
17 | /** @var NavigationItem[] */ |
||
18 | private $ancestors = []; |
||
19 | /** @var NavigationItem */ |
||
20 | private $current = null; |
||
21 | |||
22 | public function __construct(RootNavigationItem $root, Matcher $matcher) |
||
26 | |||
27 | /** |
||
28 | * @param NavigationItem $item |
||
29 | * @return bool |
||
30 | */ |
||
31 | public function isAncestor(NavigationItem $item): bool |
||
35 | |||
36 | /** |
||
37 | * @return array |
||
38 | */ |
||
39 | public function getBreadcrumbs(): array |
||
43 | |||
44 | /** |
||
45 | * @return NavigationItem |
||
46 | * @throws CurrentItemNotMatchedException |
||
47 | */ |
||
48 | public function getCurrent(): NavigationItem |
||
56 | |||
57 | /** |
||
58 | * @param NavigationItem $item |
||
59 | * @param Matcher $matcher |
||
60 | * @param int $depth |
||
61 | * @return NavigationItem|null |
||
62 | */ |
||
63 | private function process(NavigationItem &$item, Matcher &$matcher, int $depth = 0) |
||
88 | |||
89 | private function cleanAncestors() |
||
95 | } |
||
96 |
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..