@@ -526,7 +526,7 @@ |
||
526 | 526 | $spellcheckingSuggestions = $suggestions; |
527 | 527 | |
528 | 528 | if (isset($this->response->spellcheck->collations)) { |
529 | - $collections = (array) $this->response->spellcheck->collations; |
|
529 | + $collections = (array)$this->response->spellcheck->collations; |
|
530 | 530 | $spellcheckingSuggestions['collation'] = $collections['collation']; |
531 | 531 | } |
532 | 532 | } |
@@ -286,7 +286,7 @@ discard block |
||
286 | 286 | * @param Query $query The query that has been searched for. |
287 | 287 | * @param \Apache_Solr_Response $response The search's response. |
288 | 288 | */ |
289 | - protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response &$response) |
|
289 | + protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response & $response) |
|
290 | 290 | { |
291 | 291 | if ($this->shouldHideResultsFromInitialSearch($rawQuery)) { |
292 | 292 | // explicitly set number of results to 0 as we just wanted |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * |
315 | 315 | * @param \Apache_Solr_Response $response |
316 | 316 | */ |
317 | - protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response &$response) |
|
317 | + protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response & $response) |
|
318 | 318 | { |
319 | 319 | if (!is_array($response->response->docs)) { |
320 | 320 | return; |
@@ -366,7 +366,7 @@ discard block |
||
366 | 366 | * @param \Apache_Solr_Response $response |
367 | 367 | * @throws \InvalidArgumentException |
368 | 368 | */ |
369 | - protected function wrapResultDocumentInResultObject(\Apache_Solr_Response &$response) |
|
369 | + protected function wrapResultDocumentInResultObject(\Apache_Solr_Response & $response) |
|
370 | 370 | { |
371 | 371 | if (!is_array($response->response->docs)) { |
372 | 372 | return; |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | $activeFacets = $this->getActiveFacets(); |
155 | 155 | $facetNames = []; |
156 | 156 | |
157 | - array_map(function ($activeFacet) use (&$facetNames) { |
|
157 | + array_map(function($activeFacet) use (&$facetNames) { |
|
158 | 158 | $facetNames[] = substr($activeFacet, 0, strpos($activeFacet, ':')); |
159 | 159 | }, $activeFacets); |
160 | 160 | |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | $values = []; |
172 | 172 | $activeFacets = $this->getActiveFacets(); |
173 | 173 | |
174 | - array_map(function ($activeFacet) use (&$values, $facetName) { |
|
174 | + array_map(function($activeFacet) use (&$values, $facetName) { |
|
175 | 175 | $parts = explode(':', $activeFacet, 2); |
176 | 176 | if ($parts[0] === $facetName) { |
177 | 177 | $values[] = $parts[1]; |
@@ -273,7 +273,7 @@ discard block |
||
273 | 273 | public function removeAllFacetValuesByName($facetName) |
274 | 274 | { |
275 | 275 | $facetValues = $this->getActiveFacets(); |
276 | - $facetValues = array_filter($facetValues, function ($facetValue) use ($facetName) { |
|
276 | + $facetValues = array_filter($facetValues, function($facetValue) use ($facetName) { |
|
277 | 277 | $parts = explode(':', $facetValue, 2); |
278 | 278 | return $parts[0] !== $facetName; |
279 | 279 | }); |
@@ -370,7 +370,7 @@ |
||
370 | 370 | )); |
371 | 371 | |
372 | 372 | // restore |
373 | - $this->configuration= $backupConfiguration; |
|
373 | + $this->configuration = $backupConfiguration; |
|
374 | 374 | $parentContentObject->data = $backupRecord; |
375 | 375 | } |
376 | 376 |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | */ |
156 | 156 | public function __construct($keywords, $solrConfiguration = null) |
157 | 157 | { |
158 | - $keywords = (string) $keywords; |
|
158 | + $keywords = (string)$keywords; |
|
159 | 159 | if ($solrConfiguration == null) { |
160 | 160 | $this->solrConfiguration = Util::getSolrConfiguration(); |
161 | 161 | } else { |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | */ |
677 | 677 | public function getGroupFields() |
678 | 678 | { |
679 | - return (array) $this->getQueryParameter('group.field', []); |
|
679 | + return (array)$this->getQueryParameter('group.field', []); |
|
680 | 680 | } |
681 | 681 | |
682 | 682 | /** |
@@ -699,7 +699,7 @@ discard block |
||
699 | 699 | */ |
700 | 700 | public function getGroupSortings() |
701 | 701 | { |
702 | - return (array) $this->getQueryParameter('group.sort', []); |
|
702 | + return (array)$this->getQueryParameter('group.sort', []); |
|
703 | 703 | } |
704 | 704 | |
705 | 705 | // faceting |
@@ -725,7 +725,7 @@ discard block |
||
725 | 725 | */ |
726 | 726 | public function getGroupQueries() |
727 | 727 | { |
728 | - return (array) $this->getQueryParameter('group.query', []); |
|
728 | + return (array)$this->getQueryParameter('group.query', []); |
|
729 | 729 | } |
730 | 730 | |
731 | 731 | /** |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * |
194 | 194 | * @param string $msg |
195 | 195 | * @param int $severity |
196 | - * @param mixed $dataVar |
|
196 | + * @param string[] $dataVar |
|
197 | 197 | */ |
198 | 198 | protected function writeDevLog($msg, $severity = 0, $dataVar = false) |
199 | 199 | { |
@@ -1003,7 +1003,7 @@ discard block |
||
1003 | 1003 | /** |
1004 | 1004 | * Sets the fields to return by a query. |
1005 | 1005 | * |
1006 | - * @param array|string $fieldList an array or comma-separated list of field names |
|
1006 | + * @param string $fieldList an array or comma-separated list of field names |
|
1007 | 1007 | * @throws \UnexpectedValueException on parameters other than comma-separated lists and arrays |
1008 | 1008 | */ |
1009 | 1009 | public function setFieldList($fieldList = array('*', 'score')) |
@@ -1079,7 +1079,7 @@ discard block |
||
1079 | 1079 | * |
1080 | 1080 | * This query supports the complete Lucene Query Language. |
1081 | 1081 | * |
1082 | - * @param mixed $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter. |
|
1082 | + * @param string $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter. |
|
1083 | 1083 | * @see http://wiki.apache.org/solr/DisMaxQParserPlugin#q.alt |
1084 | 1084 | */ |
1085 | 1085 | public function setAlternativeQuery($alternativeQuery) |
@@ -324,7 +324,7 @@ |
||
324 | 324 | * Sets a request's parameter and its value. |
325 | 325 | * |
326 | 326 | * @param string $parameter Parameter name |
327 | - * @param mixed $value Parameter value. |
|
327 | + * @param string $value Parameter value. |
|
328 | 328 | */ |
329 | 329 | public function setParameter($parameter, $value) |
330 | 330 | { |
@@ -287,8 +287,8 @@ |
||
287 | 287 | |
288 | 288 | $mountedPagesIdsWithQueueItems = []; |
289 | 289 | foreach ($queueItemsOfExistingMountPoints as $id => $queueItemsOfExistingMountPoint) { |
290 | - if (((int) $queueItemsOfExistingMountPoint['queueItemCount']) > 0) { |
|
291 | - $mountedPagesIdsWithQueueItems[] = (int) $id; |
|
290 | + if (((int)$queueItemsOfExistingMountPoint['queueItemCount']) > 0) { |
|
291 | + $mountedPagesIdsWithQueueItems[] = (int)$id; |
|
292 | 292 | } |
293 | 293 | } |
294 | 294 |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | /** |
164 | 164 | * Returns the current time in milliseconds. |
165 | 165 | * |
166 | - * @return int |
|
166 | + * @return double |
|
167 | 167 | */ |
168 | 168 | protected function getMilliseconds() |
169 | 169 | { |
@@ -209,7 +209,7 @@ discard block |
||
209 | 209 | * |
210 | 210 | * Also does not report the time, see https://forge.typo3.org/issues/64551 |
211 | 211 | * |
212 | - * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
212 | + * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
213 | 213 | * @param boolean $useCache indicates if the ping result should be cached in the instance or not |
214 | 214 | * @return bool TRUE if Solr can be reached, FALSE if not |
215 | 215 | */ |
@@ -222,9 +222,9 @@ discard block |
||
222 | 222 | /** |
223 | 223 | * Call the /admin/ping servlet, can be used to get the runtime of a ping request. |
224 | 224 | * |
225 | - * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
225 | + * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
226 | 226 | * @param boolean $useCache indicates if the ping result should be cached in the instance or not |
227 | - * @return int runtime in milliseconds |
|
227 | + * @return double runtime in milliseconds |
|
228 | 228 | * @throws \ApacheSolrForTypo3\Solr\PingFailedException |
229 | 229 | */ |
230 | 230 | public function getPingRoundTripRuntime($timeout = 2, $useCache = true) |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | * a complete and well formed "delete" xml document |
634 | 634 | * |
635 | 635 | * @param string $rawPost Expected to be utf-8 encoded xml document |
636 | - * @param float|int $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception) |
|
636 | + * @param integer $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception) |
|
637 | 637 | * @return \Apache_Solr_Response |
638 | 638 | */ |
639 | 639 | public function delete($rawPost, $timeout = 3600) |
@@ -730,7 +730,7 @@ discard block |
||
730 | 730 | /** |
731 | 731 | * Add list of synonyms for base word to managed synonyms map |
732 | 732 | * |
733 | - * @param $baseWord |
|
733 | + * @param string $baseWord |
|
734 | 734 | * @param array $synonyms |
735 | 735 | * |
736 | 736 | * @return \Apache_Solr_Response |
@@ -751,7 +751,7 @@ discard block |
||
751 | 751 | /** |
752 | 752 | * Remove a synonym from the synonyms map |
753 | 753 | * |
754 | - * @param $baseWord |
|
754 | + * @param string $baseWord |
|
755 | 755 | * @return \Apache_Solr_Response |
756 | 756 | * @throws \Apache_Solr_InvalidArgumentException |
757 | 757 | */ |
@@ -767,7 +767,7 @@ discard block |
||
767 | 767 | /** |
768 | 768 | * Central method for making a HTTP DELETE operation against the Solr server |
769 | 769 | * |
770 | - * @param $url |
|
770 | + * @param string $url |
|
771 | 771 | * @param bool|float $timeout Read timeout in seconds |
772 | 772 | * @return \Apache_Solr_Response |
773 | 773 | */ |
@@ -253,7 +253,7 @@ |
||
253 | 253 | */ |
254 | 254 | protected function performPingRequest($timeout = 2, $useCache = true) |
255 | 255 | { |
256 | - $cacheKey = (string) ($this); |
|
256 | + $cacheKey = (string)($this); |
|
257 | 257 | if ($useCache && isset(static::$pingCache[$cacheKey])) { |
258 | 258 | return static::$pingCache[$cacheKey]; |
259 | 259 | } |