Completed
Pull Request — master (#609)
by
unknown
26:49
created
Classes/Backend/IndexingConfigurationSelectorField.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -25,10 +25,8 @@
 block discarded – undo
25 25
  ***************************************************************/
26 26
 
27 27
 use ApacheSolrForTypo3\Solr\Site;
28
-use ApacheSolrForTypo3\Solr\Util;
29 28
 use TYPO3\CMS\Backend\Form\FormResultCompiler;
30 29
 use TYPO3\CMS\Backend\Form\NodeFactory;
31
-use TYPO3\CMS\Core\Page\PageRenderer;
32 30
 use TYPO3\CMS\Core\Utility\GeneralUtility;
33 31
 
34 32
 /**
Please login to merge, or discard this patch.
Classes/Backend/IndexInspector/IndexInspectorRemoteController.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
     /**
119 119
      * Queries Solr for the current page's documents.
120 120
      *
121
-     * @return array An array of Apache_Solr_Document objects
121
+     * @return \Apache_Solr_Document[] An array of Apache_Solr_Document objects
122 122
      */
123 123
     protected function getIndexDocuments()
124 124
     {
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
     /**
142 142
      * Builds the response's meta data / description.
143 143
      *
144
-     * @return object Response meta data
144
+     * @return \stdClass Response meta data
145 145
      */
146 146
     protected function buildResponseMetaData()
147 147
     {
Please login to merge, or discard this patch.
Classes/ConnectionManager.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,6 @@
 block discarded – undo
26 26
 
27 27
 use TYPO3\CMS\Backend\Toolbar\ClearCacheActionsHookInterface;
28 28
 use TYPO3\CMS\Backend\Utility\BackendUtility;
29
-use TYPO3\CMS\Backend\Utility\IconUtility;
30 29
 use TYPO3\CMS\Core\SingletonInterface;
31 30
 use TYPO3\CMS\Core\Utility\GeneralUtility;
32 31
 use TYPO3\CMS\Core\Imaging\Icon;
Please login to merge, or discard this patch.
Classes/ContentObject/Relation.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,6 @@
 block discarded – undo
119 119
     /**
120 120
      * Gets the related items of the current record's configured field.
121 121
      *
122
-     * @param array $configuration for the content object
123 122
      * @param ContentObjectRenderer $parentContentObject parent content object
124 123
      * @return array Array of related items, values already resolved from related records
125 124
      */
Please login to merge, or discard this 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\Tests\Unit\UnitTest;
28
-use ApacheSolrForTypo3\Solr\Util;
29 28
 use ApacheSolrForTypo3\Solr\ViewHelper\Ts;
30 29
 use TYPO3\CMS\Core\TypoScript\TemplateService;
31 30
 use TYPO3\CMS\Core\Utility\GeneralUtility;
Please login to merge, or discard this patch.
Classes/Controller/AdministrationController.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -294,7 +294,7 @@
 block discarded – undo
294 294
     }
295 295
 
296 296
     /**
297
-     * @param $site
297
+     * @param Site $site
298 298
      */
299 299
     protected function setSiteAndResetCore($site)
300 300
     {
Please login to merge, or discard this patch.
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -169,10 +169,10 @@
 block discarded – undo
169 169
     {
170 170
     }
171 171
 
172
-     /**
173
-     * Call a sub-module's controller
174
-     *
175
-     */
172
+        /**
173
+         * Call a sub-module's controller
174
+         *
175
+         */
176 176
     protected function invokeModuleController()
177 177
     {
178 178
         $activeModuleDescription = $this->moduleManager->getModuleDescription($this->activeModuleName);
Please login to merge, or discard this patch.
Classes/Domain/Index/IndexService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
     /**
137 137
      * Emits a signal after all items was indexed
138 138
      *
139
-     * @param array $itemsToIndex
139
+     * @param Item[] $itemsToIndex
140 140
      */
141 141
     protected function emitAfterIndexItemsSignal($itemsToIndex)
142 142
     {
Please login to merge, or discard this patch.
Unused Use Statements   -5 removed lines patch added patch discarded remove patch
@@ -30,14 +30,9 @@
 block discarded – undo
30 30
 use ApacheSolrForTypo3\Solr\IndexQueue\Queue;
31 31
 use ApacheSolrForTypo3\Solr\Site;
32 32
 use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration;
33
-use ApacheSolrForTypo3\Solr\System\Environment\CliEnvironment;
34 33
 use ApacheSolrForTypo3\Solr\Task\IndexQueueWorkerTask;
35
-use ApacheSolrForTypo3\Solr\Util;
36 34
 use TYPO3\CMS\Backend\Utility\BackendUtility;
37
-use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
38 35
 use TYPO3\CMS\Core\Utility\GeneralUtility;
39
-use TYPO3\CMS\Core\SingletonInterface;
40
-use TYPO3\CMS\Core\Utility\ArrayUtility;
41 36
 
42 37
 /**
43 38
  * Service to perform indexing operations
Please login to merge, or discard this patch.
Classes/Domain/Search/LastSearches/LastSearchesService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@
 block discarded – undo
136 136
     /**
137 137
      * Gets the last searched keywords from the database
138 138
      *
139
-     * @param integer|bool $limit
139
+     * @param integer $limit
140 140
      * @return array An array containing the last searches of the current user
141 141
      */
142 142
     protected function getLastSearchesFromDatabase($limit = false)
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
      */
99 99
     public function addToLastSearches($keywords)
100 100
     {
101
-        $mode   = $this->configuration->getSearchLastSearchesMode();
101
+        $mode = $this->configuration->getSearchLastSearchesMode();
102 102
         switch ($mode) {
103 103
             case 'user':
104 104
                 $this->storeKeywordsToSession($keywords);
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     protected function getNextSequenceId()
228 228
     {
229 229
         $nextSequenceId = 0;
230
-        $numberOfLastSearchesToLog = (int) $this->configuration->getSearchLastSearchesLimit();
230
+        $numberOfLastSearchesToLog = (int)$this->configuration->getSearchLastSearchesLimit();
231 231
 
232 232
         $row = $this->database->exec_SELECTgetRows(
233 233
             '(sequence_id + 1) % ' . $numberOfLastSearchesToLog . ' as next_sequence_id',
Please login to merge, or discard this patch.
Classes/Domain/Search/ResultSet/SearchResult.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@
 block discarded – undo
139 139
     }
140 140
 
141 141
     /**
142
-     * @param null $variantParent
142
+     * @param SearchResult $variantParent
143 143
      */
144 144
     public function setVariantParent($variantParent)
145 145
     {
Please login to merge, or discard this patch.
Unused Use Statements   -3 removed lines patch added patch discarded remove patch
@@ -25,10 +25,7 @@
 block discarded – undo
25 25
  *  This copyright notice MUST APPEAR in all copies of the script!
26 26
  ***************************************************************/
27 27
 
28
-use ApacheSolrForTypo3\Solr\Query;
29 28
 use ApacheSolrForTypo3\Solr\Search;
30
-use IteratorAggregate;
31
-use Traversable;
32 29
 
33 30
 /**
34 31
  * Proxy class for \Apache_Solr_Document to customize \Apache_Solr_Document without
Please login to merge, or discard this patch.
Classes/Domain/Search/ResultSet/SearchResultSetService.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -421,7 +421,7 @@  discard block
 block discarded – undo
421 421
     /**
422 422
      * Checks it the results should be hidden in the response.
423 423
      *
424
-     * @param $rawQuery
424
+     * @param string $rawQuery
425 425
      * @return bool
426 426
      */
427 427
     protected function shouldHideResultsFromInitialSearch($rawQuery)
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     }
614 614
 
615 615
     /**
616
-     * @param $requestedPerPage
616
+     * @param integer $requestedPerPage
617 617
      */
618 618
     protected function setPerPageInSession($requestedPerPage)
619 619
     {
Please login to merge, or discard this patch.
Spacing   +7 added lines, -9 removed lines patch added patch discarded remove patch
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
      * @param Query $query The query that has been searched for.
288 288
      * @param \Apache_Solr_Response $response The search's response.
289 289
      */
290
-    protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response &$response)
290
+    protected function processResponse($rawQuery, Query $query, \Apache_Solr_Response & $response)
291 291
     {
292 292
         if ($this->shouldHideResultsFromInitialSearch($rawQuery)) {
293 293
             // explicitly set number of results to 0 as we just wanted
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
      *
316 316
      * @param \Apache_Solr_Response $response
317 317
      */
318
-    protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response &$response)
318
+    protected function addExpandedDocumentsFromVariants(\Apache_Solr_Response & $response)
319 319
     {
320 320
         if (!is_array($response->response->docs)) {
321 321
             return;
@@ -367,7 +367,7 @@  discard block
 block discarded – undo
367 367
      * @param \Apache_Solr_Response $response
368 368
      * @throws \InvalidArgumentException
369 369
      */
370
-    protected function wrapResultDocumentInResultObject(\Apache_Solr_Response &$response)
370
+    protected function wrapResultDocumentInResultObject(\Apache_Solr_Response & $response)
371 371
     {
372 372
         if (!is_array($response->response->docs)) {
373 373
             return;
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
         $searchResultClassName = $this->getResultClassName();
393 393
         $result = GeneralUtility::makeInstance($searchResultClassName, $originalDocument);
394 394
         if (!$result instanceof SearchResult) {
395
-            throw new \InvalidArgumentException("Could not create result object with class: " . (string) $searchResultClassName, 1470037679);
395
+            throw new \InvalidArgumentException("Could not create result object with class: " . (string)$searchResultClassName, 1470037679);
396 396
         }
397 397
 
398 398
         return $result;
@@ -404,8 +404,7 @@  discard block
 block discarded – undo
404 404
     protected function getResultClassName()
405 405
     {
406 406
         return isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName ']) ?
407
-            $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] :
408
-            'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResult';
407
+            $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultClassName '] : 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResult';
409 408
     }
410 409
 
411 410
     /**
@@ -414,8 +413,7 @@  discard block
 block discarded – undo
414 413
     protected function getResultSetClassName()
415 414
     {
416 415
         return isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName ']) ?
417
-            $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName '] :
418
-            'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResultSet';
416
+            $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['searchResultSetClassName '] : 'ApacheSolrForTypo3\\Solr\\Domain\\Search\\ResultSet\\SearchResultSet';
419 417
     }
420 418
 
421 419
     /**
@@ -561,7 +559,7 @@  discard block
 block discarded – undo
561 559
         $response = $this->search->search($query, 0, 1);
562 560
         $this->processResponse($documentId, $query, $response);
563 561
 
564
-        $resultDocument = isset($response->response->docs[0]) ?  $response->response->docs[0] : null;
562
+        $resultDocument = isset($response->response->docs[0]) ? $response->response->docs[0] : null;
565 563
         return $resultDocument;
566 564
     }
567 565
 
Please login to merge, or discard this patch.
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,6 @@
 block discarded – undo
29 29
 use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\SearchResultSetService;
30 30
 use ApacheSolrForTypo3\Solr\Domain\Search\SearchRequest;
31 31
 use ApacheSolrForTypo3\Solr\Search;
32
-use ApacheSolrForTypo3\Solr\SolrService;
33 32
 use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration;
34 33
 use ApacheSolrForTypo3\Solr\Tests\Unit\UnitTest;
35 34
 use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
Please login to merge, or discard this patch.