1 | <?php |
||
17 | class ByPropertyHierarchicalLinksFinder { |
||
18 | |||
19 | /** |
||
20 | * @var Store |
||
21 | */ |
||
22 | private $store; |
||
23 | |||
24 | /** |
||
25 | * @var boolean |
||
26 | */ |
||
27 | private $findClosestDescendant = true; |
||
28 | |||
29 | /** |
||
30 | * @var array |
||
31 | */ |
||
32 | private $propertySearchPatternByNamespace = []; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | private $antecedentHierarchyLinks = []; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | private $closestDescendantLinks = []; |
||
43 | |||
44 | /** |
||
45 | * @since 1.0 |
||
46 | * |
||
47 | * @param Store $store |
||
48 | */ |
||
49 | 7 | public function __construct( Store $store ) { |
|
52 | |||
53 | /** |
||
54 | * @since 1.0 |
||
55 | * |
||
56 | * @param boolean $findClosestDescendant |
||
57 | */ |
||
58 | 5 | public function setFindClosestDescendantState( $findClosestDescendant ) { |
|
61 | |||
62 | /** |
||
63 | * @since 1.0 |
||
64 | * |
||
65 | * @param array $propertySearchPatternByNamespace |
||
66 | */ |
||
67 | 5 | public function setPropertySearchPatternByNamespace( array $propertySearchPatternByNamespace ) { |
|
70 | |||
71 | /** |
||
72 | * @since 1.0 |
||
73 | * |
||
74 | * @param DIWikiPage $subject |
||
75 | */ |
||
76 | 6 | public function findLinksBySubject( DIWikiPage $subject ) { |
|
109 | |||
110 | /** |
||
111 | * @since 1.0 |
||
112 | * |
||
113 | * @return array |
||
114 | */ |
||
115 | 6 | public function getParents() { |
|
118 | |||
119 | /** |
||
120 | * @since 1.0 |
||
121 | * |
||
122 | * @return array |
||
123 | */ |
||
124 | 6 | public function getChildren() { |
|
127 | |||
128 | 5 | private function doResolveAntecedentHierarchyRecursively( DIWikiPage $subject, array $propertySearchPattern, RequestOptions $requestOptions, $currentDepth = 0 ) { |
|
173 | |||
174 | 2 | private function doFindClosestDescendantByInverseLink( DIWikiPage $subject, array $propertySearchPattern, RequestOptions $requestOptions ) { |
|
204 | |||
205 | } |
||
206 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.