Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2.032 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | 4 | protected function buildFacets(): void |
|
31 | { |
||
32 | 4 | $facets = $this->clientQuery->getFacetSet(); |
|
33 | // Facets should be set from the index configuration |
||
34 | 4 | foreach ($this->index->getFacetFields() as $class => $config) { |
|
35 | $facets->createFacetField('facet-' . $config['Title'])->setField($config['Field']); |
||
36 | } |
||
37 | // Count however, comes from the query |
||
38 | 4 | $facets->setMinCount($this->query->getFacetsMinCount()); |
|
39 | 4 | } |
|
63 |