Passed
Pull Request — master (#1817)
by Timo
12:16
created
Classes/Domain/Search/Query/QueryBuilder.php 2 patches
Doc Comments   +4 added lines patch added patch discarded remove patch
@@ -224,6 +224,7 @@  discard block
 block discarded – undo
224 224
      * Returns Query for Search which finds document for given page.
225 225
      * Note: The Connection is per language as recommended in ext-solr docs.
226 226
      *
227
+     * @param integer $pageId
227 228
      * @return Query
228 229
      */
229 230
     public function buildPageQuery($pageId)
@@ -245,6 +246,9 @@  discard block
 block discarded – undo
245 246
     /**
246 247
      * Returns a query for single record
247 248
      *
249
+     * @param string $type
250
+     * @param integer $uid
251
+     * @param integer $pageId
248 252
      * @return Query
249 253
      */
250 254
     public function buildRecordQuery($type, $uid, $pageId): Query
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 
317 317
         //@todo extract functionality to split field and direction
318 318
         $sortFields = GeneralUtility::trimExplode(',', $sorting);
319
-        foreach($sortFields as $sortField) {
319
+        foreach ($sortFields as $sortField) {
320 320
             $parts = GeneralUtility::trimExplode(' ', $sortField);
321 321
             $this->queryToBuild->addSort($parts[0], $parts[1]);
322 322
         }
@@ -416,13 +416,13 @@  discard block
 block discarded – undo
416 416
      */
417 417
     public function useBoostQueries($boostQueries): QueryBuilder
418 418
     {
419
-        if($boostQueries === false) {
419
+        if ($boostQueries === false) {
420 420
             $this->queryToBuild->getEDisMax()->clearBoostQueries();
421 421
         }
422 422
 
423 423
         $boostQueryArray = [];
424
-        if(is_array($boostQueries)) {
425
-            foreach($boostQueries as $boostQuery) {
424
+        if (is_array($boostQueries)) {
425
+            foreach ($boostQueries as $boostQuery) {
426 426
                 $boostQueryArray[] = ['key' => md5($boostQuery), 'query' => $boostQuery];
427 427
             }
428 428
         } else {
@@ -689,7 +689,7 @@  discard block
 block discarded – undo
689 689
             $this->queryToBuild->addParam('facet.sort', null);
690 690
 
691 691
             $params = $this->queryToBuild->getParams();
692
-            foreach($params as $key => $value) {
692
+            foreach ($params as $key => $value) {
693 693
                 if (strpos($key, 'f.') !== false) {
694 694
                     $this->queryToBuild->addParam($key, null);
695 695
                 }
@@ -700,7 +700,7 @@  discard block
 block discarded – undo
700 700
 
701 701
         //@todo check of $this->queryToBuilder->getFacetSet() can be used
702 702
         $facetingParameters = $this->getFacetParameters($faceting);
703
-        foreach($facetingParameters as $key => $value) {
703
+        foreach ($facetingParameters as $key => $value) {
704 704
             $this->queryToBuild->addParam($key, $value);
705 705
         }
706 706
 
@@ -766,12 +766,12 @@  discard block
 block discarded – undo
766 766
      */
767 767
     public function useFieldCollapsing(FieldCollapsing $fieldCollapsing): QueryBuilder
768 768
     {
769
-        if(!$fieldCollapsing->getIsEnabled()) {
769
+        if (!$fieldCollapsing->getIsEnabled()) {
770 770
             return $this;
771 771
         }
772
-        $this->useFilter('{!collapse field=' .$fieldCollapsing->getCollapseFieldName(). '}', 'fieldCollapsing');
772
+        $this->useFilter('{!collapse field=' . $fieldCollapsing->getCollapseFieldName() . '}', 'fieldCollapsing');
773 773
 
774
-        if($fieldCollapsing->getIsExpand()) {
774
+        if ($fieldCollapsing->getIsExpand()) {
775 775
             $this->queryToBuild->addParam('expand', 'true');
776 776
             $this->queryToBuild->addParam('expand.rows', $fieldCollapsing->getExpandRowCount());
777 777
         }
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
      */
798 798
     public function useGrouping(Grouping $grouping): QueryBuilder
799 799
     {
800
-        if(!$grouping->getIsEnabled()) {
800
+        if (!$grouping->getIsEnabled()) {
801 801
             $this->queryToBuild->removeComponent($this->queryToBuild->getGrouping());
802 802
             return $this;
803 803
         }
@@ -807,7 +807,7 @@  discard block
 block discarded – undo
807 807
         $this->queryToBuild->getGrouping()->setLimit($grouping->getResultsPerGroup());
808 808
         $this->queryToBuild->getGrouping()->setQueries($grouping->getQueries());
809 809
         $this->queryToBuild->getGrouping()->setFormat('grouped');
810
-        $sorting = implode(' ',$grouping->getSortings());
810
+        $sorting = implode(' ', $grouping->getSortings());
811 811
         $this->queryToBuild->getGrouping()->setSort($sorting);
812 812
 
813 813
         return $this;
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
      */
848 848
     public function useHighlighting(Highlighting $highlighting): QueryBuilder
849 849
     {
850
-        if(!$highlighting->getIsEnabled()) {
850
+        if (!$highlighting->getIsEnabled()) {
851 851
             $this->queryToBuild->removeComponent($this->queryToBuild->getHighlighting());
852 852
             return $this;
853 853
         }
Please login to merge, or discard this patch.
Classes/Domain/Search/ResultSet/SearchResultSet.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
     }
248 248
 
249 249
     /**
250
-     * @param \ApacheSolrForTypo3\Solr\Domain\Search\Query\Query $usedQuery
250
+     * @param \Solarium\QueryType\Select\Query\Query $usedQuery
251 251
      */
252 252
     public function setUsedQuery($usedQuery)
253 253
     {
Please login to merge, or discard this patch.
Classes/Query/Modifier/Faceting.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
         $allFacets = $typoScriptConfiguration->getSearchFacetingFacets();
86 86
         $facetParameters = $this->buildFacetingParameters($allFacets, $typoScriptConfiguration);
87 87
         foreach ($facetParameters as $facetParameter => $value) {
88
-            if(strtolower($facetParameter) === 'facet.field') {
88
+            if (strtolower($facetParameter) === 'facet.field') {
89 89
                 $faceting->setFields($value);
90 90
             } else {
91 91
                 $faceting->addAdditionalParameter($facetParameter, $value);
Please login to merge, or discard this patch.
Classes/Search/AnalysisComponent.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
     public function initializeSearchComponent()
50 50
     {
51 51
         if ($this->searchConfiguration['results.']['showDocumentScoreAnalysis']) {
52
-         //   $this->query->setDebugMode();
52
+            //   $this->query->setDebugMode();
53 53
         }
54 54
     }
55 55
 
Please login to merge, or discard this patch.
Classes/Search/SortingComponent.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
         if (!empty($this->searchConfiguration['query.']['sortBy'])) {
64 64
             //@todo extract functionality to split field and direction
65 65
             $sortFields = GeneralUtility::trimExplode(',', $this->searchConfiguration['query.']['sortBy']);
66
-            foreach($sortFields as $sortField) {
66
+            foreach ($sortFields as $sortField) {
67 67
                 $parts = GeneralUtility::trimExplode(' ', $sortField);
68 68
                 $this->query->addSort($parts[0], $parts[1]);
69 69
             }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
             //@todo extract functionality to split field and direction
86 86
             $sortFields = GeneralUtility::trimExplode(',', $sortFields);
87
-            foreach($sortFields as $sortField) {
87
+            foreach ($sortFields as $sortField) {
88 88
                 $parts = GeneralUtility::trimExplode(' ', $sortField);
89 89
                 $this->query->addSort($parts[0], $parts[1]);
90 90
             }
Please login to merge, or discard this patch.