@@ -109,17 +109,17 @@ discard block |
||
109 | 109 | public function highlight($fields = [], $settings = []): self |
110 | 110 | { |
111 | 111 | |
112 | - if (count($fields) === 0 && count($settings)===0) { |
|
113 | - $this->params['highlight'] = new \stdClass(); |
|
112 | + if (count($fields) === 0 && count($settings) === 0) { |
|
113 | + $this->params['highlight'] = new \stdClass(); |
|
114 | 114 | return $this; |
115 | 115 | } |
116 | 116 | $this->params['highlight'] = []; |
117 | 117 | if (count($fields) > 0) { |
118 | - $this->params['highlight']['fields'] =$fields; |
|
118 | + $this->params['highlight']['fields'] = $fields; |
|
119 | 119 | } |
120 | - if (count($settings)>0) { |
|
120 | + if (count($settings) > 0) { |
|
121 | 121 | foreach ($settings as $name => $value) { |
122 | - $this->params['highlight'][$name] =$value; |
|
122 | + $this->params['highlight'][$name] = $value; |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | return $this; |
@@ -257,10 +257,10 @@ discard block |
||
257 | 257 | $group = $field; |
258 | 258 | } |
259 | 259 | $terms = ['field'=>$field]; |
260 | - if ($limit !==null) { |
|
260 | + if ($limit !== null) { |
|
261 | 261 | $terms['size'] = $limit; |
262 | 262 | } |
263 | - $this->params['aggs'][$group] =['terms' =>$terms]; |
|
263 | + $this->params['aggs'][$group] = ['terms' =>$terms]; |
|
264 | 264 | return $this; |
265 | 265 | } |
266 | 266 |