1 | <?php |
||
30 | abstract class AbstractFacetParser implements FacetParserInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var ContentObjectRenderer |
||
34 | */ |
||
35 | protected static $reUseAbleContentObject; |
||
36 | |||
37 | /** |
||
38 | * @var ObjectManagerInterface |
||
39 | */ |
||
40 | protected $objectManager; |
||
41 | |||
42 | /** |
||
43 | * @param ObjectManagerInterface $objectManager |
||
44 | */ |
||
45 | 56 | public function injectObjectManager(ObjectManagerInterface $objectManager) |
|
49 | |||
50 | /** |
||
51 | * @return ContentObjectRenderer |
||
52 | */ |
||
53 | 22 | protected function getReUseAbleContentObject() |
|
63 | |||
64 | /** |
||
65 | * @param array $configuration |
||
66 | * @return string |
||
67 | */ |
||
68 | 56 | protected function getPlainLabelOrApplyCObject($configuration) |
|
83 | |||
84 | /** |
||
85 | * @param mixed $value |
||
86 | * @param integer $count |
||
87 | * @param string $facetName |
||
88 | * @param array $facetConfiguration |
||
89 | * @return string |
||
90 | */ |
||
91 | 49 | protected function getLabelFromRenderingInstructions($value, $count, $facetName, $facetConfiguration) |
|
104 | |||
105 | |||
106 | /** |
||
107 | * Retrieves the active facetValue for a facet from the search request. |
||
108 | * @param SearchResultSet $resultSet |
||
109 | * @param string $facetName |
||
110 | * @return array |
||
111 | */ |
||
112 | 45 | protected function getActiveFacetValuesFromRequest(SearchResultSet $resultSet, $facetName) |
|
119 | |||
120 | |||
121 | /** |
||
122 | * @param array $facetValuesFromSolrResponse |
||
123 | * @param array $facetValuesFromSearchRequest |
||
124 | * @return mixed |
||
125 | */ |
||
126 | 41 | protected function getMergedFacetValueFromSearchRequestAndSolrResponse($facetValuesFromSolrResponse, $facetValuesFromSearchRequest) |
|
138 | |||
139 | /** |
||
140 | * @param AbstractOptionsFacet $facet |
||
141 | * @param array $facetConfiguration |
||
142 | * @return AbstractOptionsFacet |
||
143 | */ |
||
144 | 46 | protected function applyManualSortOrder(AbstractOptionsFacet $facet, array $facetConfiguration) |
|
155 | |||
156 | /** |
||
157 | * @param AbstractOptionsFacet $facet |
||
158 | * @param array $facetConfiguration |
||
159 | * @return AbstractOptionsFacet |
||
160 | */ |
||
161 | 46 | protected function applyReverseOrder(AbstractOptionsFacet $facet, array $facetConfiguration) |
|
171 | |||
172 | /** |
||
173 | * @param mixed $value |
||
174 | * @param array $facetConfiguration |
||
175 | * @return boolean |
||
176 | */ |
||
177 | protected function getIsExcludedFacetValue($value, array $facetConfiguration) |
||
186 | } |
||
187 |
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.