Skip to content

Commit a04f9cd

Browse files
committed
Fixed codestyle
1 parent 09516af commit a04f9cd

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/Manticoresearch/Search.php

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -252,22 +252,22 @@ public function maxMatches($maxmatches): self
252252

253253
public function facet($field, $group = null, $limit = null, $sortField = null, $sortDirection = 'desc') : self
254254
{
255-
// reset facets
256-
if ($field === false) {
257-
$this->params['aggs'] = [];
258-
}
259-
if ($group === null) {
260-
$group = $field;
261-
}
262-
$terms = ['field'=>$field];
263-
if ($limit !==null) {
264-
$terms['size'] = $limit;
265-
}
266-
$this->params['aggs'][$group] = ['terms' =>$terms];
267-
if ($sortField !== null) {
268-
$this->params['aggs'][$group]['sort'] = [ [$sortField => $sortDirection] ];
269-
}
270-
return $this;
255+
// reset facets
256+
if ($field === false) {
257+
$this->params['aggs'] = [];
258+
}
259+
if ($group === null) {
260+
$group = $field;
261+
}
262+
$terms = ['field'=>$field];
263+
if ($limit !==null) {
264+
$terms['size'] = $limit;
265+
}
266+
$this->params['aggs'][$group] = ['terms' =>$terms];
267+
if ($sortField !== null) {
268+
$this->params['aggs'][$group]['sort'] = [ [$sortField => $sortDirection] ];
269+
}
270+
return $this;
271271
}
272272

273273
public function sort($field, $direction = 'asc', $mode = null): self

0 commit comments

Comments
 (0)