@@ -134,7 +134,7 @@ |
||
| 134 | 134 | /** |
| 135 | 135 | * Gets the last searched keywords from the database |
| 136 | 136 | * |
| 137 | - * @param int|bool $limit |
|
| 137 | + * @param integer $limit |
|
| 138 | 138 | * @return array An array containing the last searches of the current user |
| 139 | 139 | */ |
| 140 | 140 | protected function getLastSearchesFromDatabase($limit = false) |
@@ -29,7 +29,6 @@ |
||
| 29 | 29 | use ApacheSolrForTypo3\Solr\Domain\Search\SearchRequest; |
| 30 | 30 | use ApacheSolrForTypo3\Solr\Plugin\CommandPluginBase; |
| 31 | 31 | use ApacheSolrForTypo3\Solr\Plugin\PluginCommand; |
| 32 | -use ApacheSolrForTypo3\Solr\Query; |
|
| 33 | 32 | use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration; |
| 34 | 33 | use ApacheSolrForTypo3\Solr\Template; |
| 35 | 34 | use TYPO3\CMS\Core\Utility\GeneralUtility; |
@@ -274,7 +274,7 @@ |
||
| 274 | 274 | * Generates a list of page IDs in this site. Attention, this includes |
| 275 | 275 | * all page types! Deleted pages are not included. |
| 276 | 276 | * |
| 277 | - * @param int|string $rootPageId Page ID from where to start collection sub pages |
|
| 277 | + * @param integer $rootPageId Page ID from where to start collection sub pages |
|
| 278 | 278 | * @param int $maxDepth Maximum depth to decend into the site tree |
| 279 | 279 | * @return array Array of pages (IDs) in this site |
| 280 | 280 | */ |
@@ -128,7 +128,7 @@ discard block |
||
| 128 | 128 | /** |
| 129 | 129 | * Returns the current time in milliseconds. |
| 130 | 130 | * |
| 131 | - * @return int |
|
| 131 | + * @return double |
|
| 132 | 132 | */ |
| 133 | 133 | protected function getMilliseconds() |
| 134 | 134 | { |
@@ -174,7 +174,7 @@ discard block |
||
| 174 | 174 | * |
| 175 | 175 | * Also does not report the time, see https://forge.typo3.org/issues/64551 |
| 176 | 176 | * |
| 177 | - * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
| 177 | + * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
| 178 | 178 | * @return bool TRUE if Solr can be reached, FALSE if not |
| 179 | 179 | */ |
| 180 | 180 | public function ping($timeout = 2) |
@@ -186,8 +186,8 @@ discard block |
||
| 186 | 186 | /** |
| 187 | 187 | * Call the /admin/ping servlet, can be used to get the runtime of a ping request. |
| 188 | 188 | * |
| 189 | - * @param float|int $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
| 190 | - * @return int runtime in milliseconds |
|
| 189 | + * @param integer $timeout maximum time to wait for ping in seconds, -1 for unlimited (default is 2) |
|
| 190 | + * @return double runtime in milliseconds |
|
| 191 | 191 | * @throws \ApacheSolrForTypo3\Solr\PingFailedException |
| 192 | 192 | */ |
| 193 | 193 | public function getPingRoundTripRuntime($timeout = 2) |
@@ -581,7 +581,7 @@ discard block |
||
| 581 | 581 | * a complete and well formed "delete" xml document |
| 582 | 582 | * |
| 583 | 583 | * @param string $rawPost Expected to be utf-8 encoded xml document |
| 584 | - * @param float|int $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception) |
|
| 584 | + * @param integer $timeout Maximum expected duration of the delete operation on the server (otherwise, will throw a communication exception) |
|
| 585 | 585 | * @return \Apache_Solr_Response |
| 586 | 586 | */ |
| 587 | 587 | public function delete($rawPost, $timeout = 3600) |
@@ -678,7 +678,7 @@ discard block |
||
| 678 | 678 | /** |
| 679 | 679 | * Add list of synonyms for base word to managed synonyms map |
| 680 | 680 | * |
| 681 | - * @param $baseWord |
|
| 681 | + * @param string $baseWord |
|
| 682 | 682 | * @param array $synonyms |
| 683 | 683 | * |
| 684 | 684 | * @return \Apache_Solr_Response |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | /** |
| 700 | 700 | * Remove a synonym from the synonyms map |
| 701 | 701 | * |
| 702 | - * @param $baseWord |
|
| 702 | + * @param string $baseWord |
|
| 703 | 703 | * @return \Apache_Solr_Response |
| 704 | 704 | * @throws \Apache_Solr_InvalidArgumentException |
| 705 | 705 | */ |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | /** |
| 716 | 716 | * Central method for making a HTTP DELETE operation against the Solr server |
| 717 | 717 | * |
| 718 | - * @param $url |
|
| 718 | + * @param string $url |
|
| 719 | 719 | * @param bool|float $timeout Read timeout in seconds |
| 720 | 720 | * @return \Apache_Solr_Response |
| 721 | 721 | */ |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | * @param int $pageId Id of the (root) page to get the Solr configuration from. |
| 237 | 237 | * @param string $path The TypoScript configuration path to retrieve. |
| 238 | 238 | * @param bool $initializeTsfe Optionally initializes a full TSFE to get the configuration, defaults to FALSE |
| 239 | - * @param int|bool $language System language uid or FALSE to disable language usage, optional, defaults to 0 |
|
| 239 | + * @param integer $language System language uid or FALSE to disable language usage, optional, defaults to 0 |
|
| 240 | 240 | * @return TypoScriptConfiguration The Solr configuration for the requested tree. |
| 241 | 241 | */ |
| 242 | 242 | public static function getConfigurationFromPageId( |
@@ -311,9 +311,9 @@ discard block |
||
| 311 | 311 | |
| 312 | 312 | /** |
| 313 | 313 | * This function is used to retrieve the configuration from an existing TSFE instance |
| 314 | - * @param $pageId |
|
| 315 | - * @param $path |
|
| 316 | - * @param $language |
|
| 314 | + * @param integer $pageId |
|
| 315 | + * @param string $path |
|
| 316 | + * @param integer $language |
|
| 317 | 317 | * @return mixed |
| 318 | 318 | */ |
| 319 | 319 | private static function getConfigurationFromExistingTSFE($pageId, $path, $language) |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | { |
| 200 | 200 | try { |
| 201 | 201 | $pingQueryTime = $solr->getPingRoundTripRuntime(); |
| 202 | - $pingMessage = (int) $pingQueryTime . ' ms'; |
|
| 202 | + $pingMessage = (int)$pingQueryTime . ' ms'; |
|
| 203 | 203 | } catch (PingFailedException $e) { |
| 204 | 204 | $this->responseStatus = Status::ERROR; |
| 205 | 205 | $pingMessage = 'Ping error: ' . $e->getMessage(); |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | try { |
| 218 | 218 | $solrConfigMessage = $solr->getSolrconfigName(); |
| 219 | 219 | } catch (\Exception $e) { |
| 220 | - $this->responseStatus = Status::ERROR; |
|
| 220 | + $this->responseStatus = Status::ERROR; |
|
| 221 | 221 | $solrConfigMessage = 'Error determining solr config: ' . $e->getMessage(); |
| 222 | 222 | } |
| 223 | 223 | |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | try { |
| 235 | 235 | $solrSchemaMessage = $solr->getSchemaName(); |
| 236 | 236 | } catch (\Exception $e) { |
| 237 | - $this->responseStatus = Status::ERROR; |
|
| 237 | + $this->responseStatus = Status::ERROR; |
|
| 238 | 238 | $solrSchemaMessage = 'Error determining schema name: ' . $e->getMessage(); |
| 239 | 239 | } |
| 240 | 240 | |
@@ -282,7 +282,7 @@ discard block |
||
| 282 | 282 | * @param Query $query The query that has been searched for. |
| 283 | 283 | * @param \Apache_Solr_Response $response The search's response. |
| 284 | 284 | */ |
| 285 | - protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response &$response) |
|
| 285 | + protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response & $response) |
|
| 286 | 286 | { |
| 287 | 287 | if ($this->shouldHideResultsFromInitialSearch($rawQuery)) { |
| 288 | 288 | // explicitly set number of results to 0 as we just wanted |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | * |
| 311 | 311 | * @param \Apache_Solr_Response $response |
| 312 | 312 | */ |
| 313 | - protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response &$response) |
|
| 313 | + protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response & $response) |
|
| 314 | 314 | { |
| 315 | 315 | if (!is_array($response->response->docs)) { |
| 316 | 316 | return; |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | * @param \Apache_Solr_Response $response |
| 363 | 363 | * @throws \InvalidArgumentException |
| 364 | 364 | */ |
| 365 | - protected function wrapResultDocumentInResultObject(\Apache_Solr_Response &$response) |
|
| 365 | + protected function wrapResultDocumentInResultObject(\Apache_Solr_Response & $response) |
|
| 366 | 366 | { |
| 367 | 367 | if (!is_array($response->response->docs)) { |
| 368 | 368 | return; |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | $searchResultClassName = $this->getResultClassName(); |
| 388 | 388 | $result = GeneralUtility::makeInstance($searchResultClassName, $originalDocument); |
| 389 | 389 | if (!$result instanceof SearchResult) { |
| 390 | - throw new \InvalidArgumentException('Could not create result object with class: ' . (string) $searchResultClassName, 1470037679); |
|
| 390 | + throw new \InvalidArgumentException('Could not create result object with class: ' . (string)$searchResultClassName, 1470037679); |
|
| 391 | 391 | } |
| 392 | 392 | |
| 393 | 393 | return $result; |
@@ -399,8 +399,7 @@ discard block |
||
| 399 | 399 | protected function getResultClassName() |
| 400 | 400 | { |
| 401 | 401 | return isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName ']) ? |
| 402 | - $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] : |
|
| 403 | - 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResult'; |
|
| 402 | + $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] : 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResult'; |
|
| 404 | 403 | } |
| 405 | 404 | |
| 406 | 405 | /** |
@@ -409,8 +408,7 @@ discard block |
||
| 409 | 408 | protected function getResultSetClassName() |
| 410 | 409 | { |
| 411 | 410 | return isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName ']) ? |
| 412 | - $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName '] : |
|
| 413 | - 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResultSet'; |
|
| 411 | + $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName '] : 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResultSet'; |
|
| 414 | 412 | } |
| 415 | 413 | |
| 416 | 414 | /** |
@@ -556,7 +554,7 @@ discard block |
||
| 556 | 554 | $response = $this->search->search($query, 0, 1); |
| 557 | 555 | $this->processResponse($documentId, $query, $response); |
| 558 | 556 | |
| 559 | - $resultDocument = isset($response->response->docs[0]) ? $response->response->docs[0] : null; |
|
| 557 | + $resultDocument = isset($response->response->docs[0]) ? $response->response->docs[0] : null; |
|
| 560 | 558 | return $resultDocument; |
| 561 | 559 | } |
| 562 | 560 | |