@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | /** |
| 55 | - * @param $filterFieldName |
|
| 55 | + * @param string $filterFieldName |
|
| 56 | 56 | */ |
| 57 | 57 | public function removeByPrefix($filterFieldName) |
| 58 | 58 | { |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | |
| 77 | 77 | /** |
| 78 | - * @param $filterString |
|
| 78 | + * @param string $filterString |
|
| 79 | 79 | * @param string $name |
| 80 | 80 | */ |
| 81 | 81 | public function add($filterString, $name = '') |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | public function removeByPrefix($filterFieldName) |
| 58 | 58 | { |
| 59 | 59 | foreach ($this->filters as $key => $filterString) { |
| 60 | - if (GeneralUtility::isFirstPartOfStr($filterString, $filterFieldName )) { |
|
| 60 | + if (GeneralUtility::isFirstPartOfStr($filterString, $filterFieldName)) { |
|
| 61 | 61 | unset($this->filters[$key]); |
| 62 | 62 | } |
| 63 | 63 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | */ |
| 81 | 81 | public function add($filterString, $name = '') |
| 82 | 82 | { |
| 83 | - if($name !== '') { |
|
| 83 | + if ($name !== '') { |
|
| 84 | 84 | $this->filters[$name] = $filterString; |
| 85 | 85 | } else { |
| 86 | 86 | $this->filters[] = $filterString; |
@@ -547,7 +547,7 @@ discard block |
||
| 547 | 547 | /** |
| 548 | 548 | * Activates and deactivates grouping for the current query. |
| 549 | 549 | * |
| 550 | - * @param bool|Grouping $grouping TRUE to enable grouping, FALSE to disable grouping |
|
| 550 | + * @param Grouping $grouping TRUE to enable grouping, FALSE to disable grouping |
|
| 551 | 551 | * @return void |
| 552 | 552 | */ |
| 553 | 553 | public function setGrouping($grouping = true) |
@@ -735,7 +735,7 @@ discard block |
||
| 735 | 735 | /** |
| 736 | 736 | * Activates and deactivates faceting for the current query. |
| 737 | 737 | * |
| 738 | - * @param bool|Faceting $faceting TRUE to enable faceting, FALSE to disable faceting |
|
| 738 | + * @param Faceting $faceting TRUE to enable faceting, FALSE to disable faceting |
|
| 739 | 739 | * @return void |
| 740 | 740 | */ |
| 741 | 741 | public function setFaceting($faceting = true) |
@@ -948,7 +948,7 @@ discard block |
||
| 948 | 948 | * Sets the fields to return by a query. |
| 949 | 949 | * |
| 950 | 950 | * @deprecated Use method setReturnFields() instead, will be removed in 8.0 |
| 951 | - * @param array|string $fieldList an array or comma-separated list of field names |
|
| 951 | + * @param string $fieldList an array or comma-separated list of field names |
|
| 952 | 952 | * @throws \UnexpectedValueException on parameters other than comma-separated lists and arrays |
| 953 | 953 | */ |
| 954 | 954 | public function setFieldList($fieldList = ['*', 'score']) |
@@ -1042,7 +1042,7 @@ discard block |
||
| 1042 | 1042 | * |
| 1043 | 1043 | * This query supports the complete Lucene Query Language. |
| 1044 | 1044 | * |
| 1045 | - * @param mixed $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter. |
|
| 1045 | + * @param string $alternativeQuery String alternative query or boolean FALSE to disable / reset the q.alt parameter. |
|
| 1046 | 1046 | * @see http://wiki.apache.org/solr/DisMaxQParserPlugin#q.alt |
| 1047 | 1047 | */ |
| 1048 | 1048 | public function setAlternativeQuery($alternativeQuery) |
@@ -614,7 +614,7 @@ discard block |
||
| 614 | 614 | */ |
| 615 | 615 | public function getResultsPerPage() |
| 616 | 616 | { |
| 617 | - if($this->getGrouping()->getIsEnabled()) { |
|
| 617 | + if ($this->getGrouping()->getIsEnabled()) { |
|
| 618 | 618 | return $this->getGrouping()->getNumberOfGroups(); |
| 619 | 619 | } |
| 620 | 620 | |
@@ -1237,7 +1237,7 @@ discard block |
||
| 1237 | 1237 | */ |
| 1238 | 1238 | public function setHighlighting($highlighting = true, $fragmentSize = 200) |
| 1239 | 1239 | { |
| 1240 | - if($highlighting instanceof Highlighting) { |
|
| 1240 | + if ($highlighting instanceof Highlighting) { |
|
| 1241 | 1241 | $this->highlighting = $highlighting; |
| 1242 | 1242 | return; |
| 1243 | 1243 | } |
@@ -24,9 +24,7 @@ |
||
| 24 | 24 | * This copyright notice MUST APPEAR in all copies of the script! |
| 25 | 25 | ***************************************************************/ |
| 26 | 26 | |
| 27 | -use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\FacetQueryBuilderRegistry; |
|
| 28 | 27 | use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\FacetRegistry; |
| 29 | -use ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\FacetUrlDecoderRegistry; |
|
| 30 | 28 | use ApacheSolrForTypo3\Solr\Query; |
| 31 | 29 | use ApacheSolrForTypo3\Solr\System\Configuration\TypoScriptConfiguration; |
| 32 | 30 | use ApacheSolrForTypo3\Solr\Util; |
@@ -93,7 +93,7 @@ |
||
| 93 | 93 | $this->addFacetQueryFilters(); |
| 94 | 94 | |
| 95 | 95 | foreach ($this->facetParameters as $facetParameter => $value) { |
| 96 | - if(strtolower($facetParameter) === 'facet.field') { |
|
| 96 | + if (strtolower($facetParameter) === 'facet.field') { |
|
| 97 | 97 | $query->getFaceting()->setFields($value); |
| 98 | 98 | } else { |
| 99 | 99 | $query->getFaceting()->addAdditionalParameter($facetParameter, $value); |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | */ |
| 163 | 163 | public function build() |
| 164 | 164 | { |
| 165 | - if(!$this->isEnabled) { |
|
| 165 | + if (!$this->isEnabled) { |
|
| 166 | 166 | return []; |
| 167 | 167 | } |
| 168 | 168 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | public static function fromTypoScriptConfiguration(TypoScriptConfiguration $solrConfiguration) |
| 200 | 200 | { |
| 201 | 201 | $isEnabled = $solrConfiguration->getSearchResultsHighlighting(); |
| 202 | - if(!$isEnabled) { |
|
| 202 | + if (!$isEnabled) { |
|
| 203 | 203 | return new Highlighting(false); |
| 204 | 204 | } |
| 205 | 205 | |
@@ -244,7 +244,7 @@ |
||
| 244 | 244 | public static function fromTypoScriptConfiguration(TypoScriptConfiguration $solrConfiguration) |
| 245 | 245 | { |
| 246 | 246 | $isEnabled = $solrConfiguration->getSearchGrouping(); |
| 247 | - if(!$isEnabled) { |
|
| 247 | + if (!$isEnabled) { |
|
| 248 | 248 | return new Grouping(false); |
| 249 | 249 | } |
| 250 | 250 | |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | $facetParameters['facet.limit'] = $this->limit; |
| 213 | 213 | $facetParameters['facet.field'] = $this->fields; |
| 214 | 214 | |
| 215 | - foreach($this->additionalParameters as $additionalParameterKey => $additionalParameterValue) { |
|
| 215 | + foreach ($this->additionalParameters as $additionalParameterKey => $additionalParameterValue) { |
|
| 216 | 216 | $facetParameters[$additionalParameterKey] = $additionalParameterValue; |
| 217 | 217 | } |
| 218 | 218 | |
@@ -237,7 +237,7 @@ discard block |
||
| 237 | 237 | |
| 238 | 238 | // alpha and lex alias for index |
| 239 | 239 | if ($this->sorting == 'alpha' || $this->sorting == 'lex') { |
| 240 | - $solrSorting= 'index'; |
|
| 240 | + $solrSorting = 'index'; |
|
| 241 | 241 | } |
| 242 | 242 | |
| 243 | 243 | $facetParameters['facet.sort'] = $solrSorting; |
@@ -252,7 +252,7 @@ discard block |
||
| 252 | 252 | public static function fromTypoScriptConfiguration(TypoScriptConfiguration $solrConfiguration) |
| 253 | 253 | { |
| 254 | 254 | $isEnabled = $solrConfiguration->getSearchFaceting(); |
| 255 | - if(!$isEnabled) { |
|
| 255 | + if (!$isEnabled) { |
|
| 256 | 256 | return new Faceting(false); |
| 257 | 257 | } |
| 258 | 258 | |
@@ -32,7 +32,7 @@ |
||
| 32 | 32 | * |
| 33 | 33 | * @package ApacheSolrForTypo3\Solr\Domain\Search\Query\ParameterBuilder |
| 34 | 34 | */ |
| 35 | -class ReturnFields implements ParameterBuilder { |
|
| 35 | +class ReturnFields implements ParameterBuilder { |
|
| 36 | 36 | |
| 37 | 37 | /** |
| 38 | 38 | * @var array |
@@ -2157,7 +2157,7 @@ |
||
| 2157 | 2157 | } |
| 2158 | 2158 | |
| 2159 | 2159 | $configuredGroups = $groupingConfiguration['groups.']; |
| 2160 | - if(!is_array($configuredGroups)) { |
|
| 2160 | + if (!is_array($configuredGroups)) { |
|
| 2161 | 2161 | return $highestLimit; |
| 2162 | 2162 | } |
| 2163 | 2163 | |