Skip to content

Commit 9901806

Browse files
committed
*fix - cs
1 parent dc315c8 commit 9901806

File tree

7 files changed

+11
-10
lines changed

7 files changed

+11
-10
lines changed

src/Features/HasSorting.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function addSort(string $field, string|array $config = SortDirections::AS
3232
*/
3333
protected function buildSortTo(array &$toArray): self
3434
{
35-
if (false === empty($this->sort)) {
35+
if (empty($this->sort) === false) {
3636
foreach ($this->sort as $sort => $config) {
3737
$toArray['sort'][$sort] = $config;
3838
}

src/Options/Collapse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function build(): array
4848
$result['max_concurrent_group_searches'] = $this->maxConcurrentSearchers;
4949
}
5050

51-
if (false === empty($this->innerHits)) {
51+
if (empty($this->innerHits) === false) {
5252
$result['inner_hits'] = array_map(fn (InnerHit $hit) => $hit->build(), $this->innerHits);
5353
}
5454

src/Query/MatchQuery.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,13 @@ class MatchQuery extends AbstractMatchQuery
1212
use HasOperator;
1313
use HasMinimumShouldMatch;
1414

15-
public function __construct(string $field, string $query, ?string $analyzer = null, ?string $operator = null, ?string $minimumShouldMatch = null)
15+
public function __construct(
16+
string $field,
17+
string $query,
18+
?string $analyzer = null,
19+
?string $operator = null,
20+
?string $minimumShouldMatch = null
21+
)
1622
{
1723
parent::__construct($field, $query, $analyzer);
1824

src/Query/PrefixQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function build(): array
4848
return [
4949
'prefix' => [
5050
$this->field => $build,
51-
]
51+
],
5252
];
5353
}
5454
}

src/Query/RankFeatureQuery.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@ class RankFeatureQuery implements QueryInterface
1313
use HasField;
1414
use HasBoost;
1515

16-
public function __construct(
17-
string $field,
18-
?float $boost = null
19-
) {
16+
public function __construct(string $field, ?float $boost = null) {
2017
$this->field = $field;
2118
$this->boost = $boost;
2219
}

tests/Query/PrefixQueryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Tests\Erichard\ElasticQueryBuilder\Query;
66

7-
use Erichard\ElasticQueryBuilder\Query\MatchQuery;
87
use Erichard\ElasticQueryBuilder\Query\PrefixQuery;
98
use PHPUnit\Framework\TestCase;
109

tests/Query/RangeQueryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace Tests\Erichard\ElasticQueryBuilder\Query;
66

7-
use Erichard\ElasticQueryBuilder\Query\MatchQuery;
87
use Erichard\ElasticQueryBuilder\Query\RangeQuery;
98
use PHPUnit\Framework\TestCase;
109

0 commit comments

Comments
 (0)