Completed
Pull Request — master (#926)
by
unknown
11:30
created
Classes/Site.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
     {
256 256
         /** @var $registry Registry */
257 257
         $registry = GeneralUtility::makeInstance(Registry::class);
258
-        $servers = (array) $registry->get('tx_solr', 'servers', []);
258
+        $servers = (array)$registry->get('tx_solr', 'servers', []);
259 259
         return $servers;
260 260
     }
261 261
 
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
         $recursionRootPageId = intval($rootPageId);
340 340
         if ($rootPageId == 'SITE_ROOT') {
341 341
             $recursionRootPageId = $this->rootPage['uid'];
342
-            $pageIds[] = (int) $this->rootPage['uid'];
342
+            $pageIds[] = (int)$this->rootPage['uid'];
343 343
         }
344 344
 
345 345
         if ($maxDepth <= 0) {
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
         $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'pages', 'pid = ' . $recursionRootPageId . ' ' . BackendUtility::deleteClause('pages') . $initialPagesAdditionalWhereClause);
382 382
 
383 383
         while ($page = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)) {
384
-            $pageIds[] = (int) $page['uid'];
384
+            $pageIds[] = (int)$page['uid'];
385 385
 
386 386
             if ($maxDepth > 1) {
387 387
                 $pageIds = array_merge($pageIds, $this->getPages($page['uid'], $maxDepth - 1));
Please login to merge, or discard this patch.
Classes/Domain/Search/ResultSet/SearchResultSetService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
362 362
      * @param \Apache_Solr_Response $response
363 363
      * @throws \Apache_Solr_ParserException
364 364
      */
365
-    protected function wrapResultDocumentInResultObject(\Apache_Solr_Response &$response)
365
+    protected function wrapResultDocumentInResultObject(\Apache_Solr_Response & $response)
366 366
     {
367 367
         try {
368 368
             $documents = $response->response->docs;
Please login to merge, or discard this patch.
Classes/Domain/Search/Statistics/StatisticsRepository.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -43,9 +43,9 @@  discard block
 block discarded – undo
43 43
     public function getSearchStatistics($rootPageId, $days = 30, $limit = 10)
44 44
     {
45 45
         $now = time();
46
-        $timeStart = (int) ($now - 86400 * intval($days)); // 86400 seconds/day
47
-        $rootPageId = (int) $rootPageId;
48
-        $limit = (int) $limit;
46
+        $timeStart = (int)($now - 86400 * intval($days)); // 86400 seconds/day
47
+        $rootPageId = (int)$rootPageId;
48
+        $limit = (int)$limit;
49 49
 
50 50
         $statisticsRows = $this->getDatabase()->exec_SELECTgetRows(
51 51
             'keywords, count(keywords) as count, num_found as hits',
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
             $sumCount += $statisticsRow['count'];
64 64
         }
65 65
 
66
-        $statisticsRows = array_map(function ($row) use ($sumCount) {
66
+        $statisticsRows = array_map(function($row) use ($sumCount) {
67 67
             $row['percent'] = $row['count'] * 100 / $sumCount;
68 68
 
69 69
             return $row;
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
      */
110 110
     protected function getTopKeyWordsWithOrWithoutHits($rootPageId, $days = 30, $limit, $withoutHits)
111 111
     {
112
-        $rootPageId = (int) $rootPageId;
113
-        $limit = (int) $limit;
114
-        $withoutHits = (bool) $withoutHits;
112
+        $rootPageId = (int)$rootPageId;
113
+        $limit = (int)$limit;
114
+        $withoutHits = (bool)$withoutHits;
115 115
 
116 116
         $now = time();
117 117
         $timeStart = $now - 86400 * intval($days); // 86400 seconds/day
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
                 // for the hits we need to take the average
157 157
             $avgHits = $this->getAverageFromField($mergedRow, $statisticsRow, 'hits');
158
-            $mergedRow['hits'] = (int) $avgHits;
158
+            $mergedRow['hits'] = (int)$avgHits;
159 159
 
160 160
                 // for the count we need to take the sum, because it's the sum of searches
161 161
             $mergedRow['count'] = $mergedRow['count'] + $statisticsRow['count'];
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
      * @param string $fieldName
200 200
      * @return float|int
201 201
      */
202
-    protected function getAverageFromField(array &$mergedRow, array $statisticsRow,  $fieldName)
202
+    protected function getAverageFromField(array &$mergedRow, array $statisticsRow, $fieldName)
203 203
     {
204 204
         // when this is the first row we can take it.
205 205
         if ($mergedRow['mergedrows'] === 1) {
Please login to merge, or discard this patch.
Classes/GarbageCollector.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,6 @@
 block discarded – undo
25 25
  ***************************************************************/
26 26
 
27 27
 use ApacheSolrForTypo3\Solr\IndexQueue\Queue;
28
-use ApacheSolrForTypo3\Solr\System\Configuration\ConfigurationManager;
29 28
 use ApacheSolrForTypo3\Solr\System\TCA\TCAService;
30 29
 use TYPO3\CMS\Backend\Utility\BackendUtility;
31 30
 use TYPO3\CMS\Core\DataHandling\DataHandler;
Please login to merge, or discard this patch.
Classes/IndexQueue/RecordMonitor.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,6 @@
 block discarded – undo
27 27
 use ApacheSolrForTypo3\Solr\AbstractDataHandlerListener;
28 28
 use ApacheSolrForTypo3\Solr\Domain\Index\Queue\RecordMonitor\Helper\MountPagesUpdater;
29 29
 use ApacheSolrForTypo3\Solr\GarbageCollector;
30
-use ApacheSolrForTypo3\Solr\System\Configuration\ConfigurationManager;
31 30
 use ApacheSolrForTypo3\Solr\System\TCA\TCAService;
32 31
 use ApacheSolrForTypo3\Solr\Util;
33 32
 use TYPO3\CMS\Backend\Utility\BackendUtility;
Please login to merge, or discard this patch.
Classes/System/Configuration/ConfigurationManager.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,6 @@
 block discarded – undo
24 24
  *  This copyright notice MUST APPEAR in all copies of the script!
25 25
  ***************************************************************/
26 26
 
27
-use TYPO3\CMS\Backend\Utility\BackendUtility;
28 27
 use TYPO3\CMS\Core\SingletonInterface;
29 28
 use TYPO3\CMS\Core\Utility\GeneralUtility;
30 29
 
Please login to merge, or discard this patch.