@@ -165,10 +165,10 @@ |
||
165 | 165 | // direct access for small paths |
166 | 166 | case 1: |
167 | 167 | $this->data[$pathArray[0]] = $value; |
168 | - return; |
|
168 | + return; |
|
169 | 169 | case 2: |
170 | 170 | $this->data[$pathArray[0]][$pathArray[1]] = $value; |
171 | - return; |
|
171 | + return; |
|
172 | 172 | default: |
173 | 173 | $this->setDeepElementWithLoop($pathArray, $value); |
174 | 174 | } |
@@ -247,12 +247,12 @@ |
||
247 | 247 | protected function getPathAsArray($path) |
248 | 248 | { |
249 | 249 | if (!$this->includePathSeparatorInKeys) { |
250 | - $pathArray = explode($this->pathSeparator, $path); |
|
250 | + $pathArray = explode($this->pathSeparator, $path); |
|
251 | 251 | return $pathArray; |
252 | 252 | } |
253 | 253 | |
254 | 254 | $substitutedPath = str_replace($this->pathSeparator, $this->pathSeparator . '@@@', trim($path)); |
255 | - $pathArray = array_filter(explode('@@@', $substitutedPath)); |
|
255 | + $pathArray = array_filter(explode('@@@', $substitutedPath)); |
|
256 | 256 | return $pathArray; |
257 | 257 | } |
258 | 258 | } |
@@ -767,7 +767,6 @@ discard block |
||
767 | 767 | * Returns if a log message should be written when a page was indexed. |
768 | 768 | * |
769 | 769 | * plugin.tx_solr.logging.indexing.pageIndexed |
770 | - |
|
771 | 770 | * @param bool $defaultIfEmpty |
772 | 771 | * @return bool |
773 | 772 | */ |
@@ -781,7 +780,6 @@ discard block |
||
781 | 780 | * Returns if a log message should be written when the TYPO3 search markers are missing in the page. |
782 | 781 | * |
783 | 782 | * plugin.tx_solr.logging.indexing.missingTypo3SearchMarkers |
784 | - |
|
785 | 783 | * @param bool $defaultIfEmpty |
786 | 784 | * @return bool |
787 | 785 | */ |
@@ -809,7 +807,6 @@ discard block |
||
809 | 807 | * Indicates if the debug mode is enabled or not. |
810 | 808 | * |
811 | 809 | * plugin.tx_solr.enableDebugMode |
812 | - |
|
813 | 810 | * @param bool $defaultIfEmpty |
814 | 811 | * @return bool |
815 | 812 | */ |
@@ -604,7 +604,7 @@ discard block |
||
604 | 604 | * |
605 | 605 | * @param string $configurationName |
606 | 606 | * @param string $defaultIfEmpty |
607 | - * @return mixed |
|
607 | + * @return string |
|
608 | 608 | */ |
609 | 609 | public function getIndexQueueInitializerClassByConfigurationName($configurationName, $defaultIfEmpty = 'ApacheSolrForTypo3\\Solr\\IndexQueue\\Initializer\\Record') |
610 | 610 | { |
@@ -1309,7 +1309,7 @@ discard block |
||
1309 | 1309 | * plugin.tx_solr.search.query.allowEmptyQuery |
1310 | 1310 | * |
1311 | 1311 | * @param string $defaultIfEmpty |
1312 | - * @return string |
|
1312 | + * @return boolean |
|
1313 | 1313 | */ |
1314 | 1314 | public function getSearchQueryAllowEmptyQuery($defaultIfEmpty = '') |
1315 | 1315 | { |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | * |
1372 | 1372 | * plugin.tx_solr.search.query.returnFields |
1373 | 1373 | * |
1374 | - * @param array $defaultIfEmpty |
|
1374 | + * @param string[] $defaultIfEmpty |
|
1375 | 1375 | * @return array |
1376 | 1376 | */ |
1377 | 1377 | public function getSearchQueryReturnFieldsAsArray($defaultIfEmpty = array()) |
@@ -1956,7 +1956,7 @@ discard block |
||
1956 | 1956 | * plugin.tx_solr.index.enableCommits |
1957 | 1957 | * |
1958 | 1958 | * @param bool $defaultIfEmpty |
1959 | - * @return bool |
|
1959 | + * @return boolean|null |
|
1960 | 1960 | */ |
1961 | 1961 | public function getEnableCommits($defaultIfEmpty = true) |
1962 | 1962 | { |
@@ -60,7 +60,7 @@ |
||
60 | 60 | } |
61 | 61 | |
62 | 62 | if (isset($cropConfiguration['cropFullWords'])) { |
63 | - $this->cropFullWords = (boolean) $cropConfiguration ['cropFullWords']; |
|
63 | + $this->cropFullWords = (boolean)$cropConfiguration ['cropFullWords']; |
|
64 | 64 | } |
65 | 65 | } |
66 | 66 |
@@ -53,14 +53,14 @@ |
||
53 | 53 | public function execute(array $arguments = array()) |
54 | 54 | { |
55 | 55 | try { |
56 | - $iterator = unserialize($arguments[0]); |
|
56 | + $iterator = unserialize($arguments[0]); |
|
57 | 57 | } catch (\Exception $e) { |
58 | 58 | $iterator = []; |
59 | 59 | } |
60 | 60 | if ($iterator === false) { |
61 | 61 | $iterator = []; |
62 | 62 | } |
63 | - $variable = $arguments[1]; |
|
63 | + $variable = $arguments[1]; |
|
64 | 64 | |
65 | 65 | $data = ''; |
66 | 66 | foreach ($iterator as $value) { |
@@ -218,7 +218,7 @@ |
||
218 | 218 | $ucHelperKey = Util::underscoredToUpperCamelCase($helperKey); |
219 | 219 | $vendorNameSpace = 'ApacheSolrForTypo3\\Solr\\'; |
220 | 220 | $possibleFilename = $ucHelperKey . '.php'; |
221 | - $possibleClassName = $vendorNameSpace . str_replace('/', '\\', |
|
221 | + $possibleClassName = $vendorNameSpace . str_replace('/', '\\', |
|
222 | 222 | $viewHelperRealPath) . '\\' . $ucHelperKey; |
223 | 223 | |
224 | 224 | $viewHelperIncludePath = ExtensionManagementUtility::extPath($extensionKey) |
@@ -1152,7 +1152,7 @@ |
||
1152 | 1152 | } |
1153 | 1153 | |
1154 | 1154 | /** |
1155 | - * @param $templateContent |
|
1155 | + * @param string $templateContent |
|
1156 | 1156 | * @return mixed |
1157 | 1157 | */ |
1158 | 1158 | public function setTemplateContent($templateContent) |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | public function getSearchStatistics($rootPageId, $days = 30, $limit = 10) |
47 | 47 | { |
48 | 48 | $now = time(); |
49 | - $timeStart = (int) ($now - 86400 * intval($days)); // 86400 seconds/day |
|
50 | - $rootPageId = (int) $rootPageId; |
|
51 | - $limit = (int) $limit; |
|
49 | + $timeStart = (int)($now - 86400 * intval($days)); // 86400 seconds/day |
|
50 | + $rootPageId = (int)$rootPageId; |
|
51 | + $limit = (int)$limit; |
|
52 | 52 | |
53 | 53 | $statisticsRows = $this->getDatabase()->exec_SELECTgetRows( |
54 | 54 | 'keywords, count(keywords) as count, num_found as hits', |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | $sumCount += $statisticsRow['count']; |
67 | 67 | } |
68 | 68 | |
69 | - $statisticsRows = array_map(function ($row) use ($sumCount) { |
|
69 | + $statisticsRows = array_map(function($row) use ($sumCount) { |
|
70 | 70 | $row['percent'] = $row['count'] * 100 / $sumCount; |
71 | 71 | |
72 | 72 | return $row; |
@@ -112,9 +112,9 @@ discard block |
||
112 | 112 | */ |
113 | 113 | protected function getTopKeyWordsWithOrWithoutHits($rootPageId, $days = 30, $limit, $withoutHits) |
114 | 114 | { |
115 | - $rootPageId = (int) $rootPageId; |
|
116 | - $limit = (int) $limit; |
|
117 | - $withoutHits = (bool) $withoutHits; |
|
115 | + $rootPageId = (int)$rootPageId; |
|
116 | + $limit = (int)$limit; |
|
117 | + $withoutHits = (bool)$withoutHits; |
|
118 | 118 | |
119 | 119 | $now = time(); |
120 | 120 | $timeStart = $now - 86400 * intval($days); // 86400 seconds/day |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | |
160 | 160 | // for the hits we need to take the average |
161 | 161 | $avgHits = $this->getAverageFromField($mergedRow, $statisticsRow, 'hits'); |
162 | - $mergedRow['hits'] = (int) $avgHits; |
|
162 | + $mergedRow['hits'] = (int)$avgHits; |
|
163 | 163 | |
164 | 164 | // for the count we need to take the sum, because it's the sum of searches |
165 | 165 | $mergedRow['count'] = $mergedRow['count'] + $statisticsRow['count']; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | * @param array $statisticsRow |
204 | 204 | * @return float|int |
205 | 205 | */ |
206 | - protected function getAverageFromField(array &$mergedRow, array $statisticsRow, $fieldName) |
|
206 | + protected function getAverageFromField(array &$mergedRow, array $statisticsRow, $fieldName) |
|
207 | 207 | { |
208 | 208 | // when this is the first row we can take it. |
209 | 209 | if ($mergedRow['mergedrows'] === 1) { |
@@ -39,9 +39,9 @@ |
||
39 | 39 | */ |
40 | 40 | protected $configuration; |
41 | 41 | |
42 | - /** |
|
43 | - * @var string |
|
44 | - */ |
|
42 | + /** |
|
43 | + * @var string |
|
44 | + */ |
|
45 | 45 | protected $prefix; |
46 | 46 | |
47 | 47 | /** |
@@ -157,7 +157,7 @@ |
||
157 | 157 | */ |
158 | 158 | public function __construct($keywords, $solrConfiguration = null) |
159 | 159 | { |
160 | - $keywords = (string) $keywords; |
|
160 | + $keywords = (string)$keywords; |
|
161 | 161 | if ($solrConfiguration == null) { |
162 | 162 | $this->solrConfiguration = Util::getSolrConfiguration(); |
163 | 163 | } else { |
@@ -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) |
@@ -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 | } |