@@ -31,8 +31,9 @@ |
||
| 31 | 31 | * @see \StingerSoft\EntitySearchBundle\Services\SearchService::setObjectManager() |
| 32 | 32 | */ |
| 33 | 33 | public function setObjectManager(ObjectManager $om) { |
| 34 | - if($this->objectManager) |
|
| 35 | - return; |
|
| 34 | + if($this->objectManager) { |
|
| 35 | + return; |
|
| 36 | + } |
|
| 36 | 37 | $this->objectManager = $om; |
| 37 | 38 | } |
| 38 | 39 | |
@@ -134,12 +134,15 @@ |
||
| 134 | 134 | protected function generateFacetChoices($facetType, array $facets, array $selectedFacets = array(), $formatter) { |
| 135 | 135 | $choices = array(); |
| 136 | 136 | foreach($facets as $facet => $count) { |
| 137 | - if($count == 0 && !in_array($facet, $selectedFacets)) |
|
| 138 | - continue; |
|
| 137 | + if($count == 0 && !in_array($facet, $selectedFacets)) { |
|
| 138 | + continue; |
|
| 139 | + } |
|
| 139 | 140 | $choices[$this->formatFacet($formatter, $facetType, $facet, $count)] = $facet; |
| 140 | 141 | } |
| 141 | 142 | foreach($selectedFacets as $facet) { |
| 142 | - if(isset($facets[$facet])) continue; |
|
| 143 | + if(isset($facets[$facet])) { |
|
| 144 | + continue; |
|
| 145 | + } |
|
| 143 | 146 | $count = 0; |
| 144 | 147 | $choices[$this->formatFacet($formatter, $facetType, $facet, $count)] = $facet; |
| 145 | 148 | } |