@@ -85,7 +85,7 @@ |
||
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); |
@@ -63,7 +63,7 @@ discard block |
||
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 |
||
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 | } |
@@ -316,7 +316,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 | } |