Skip to content

Commit f888fd7

Browse files
committed
Avoid count
1 parent 5b7c3e6 commit f888fd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Endpoints/Indexes.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ public function getTasks(?TasksQuery $options = null): TasksResults
171171
{
172172
$options = $options ?? new TasksQuery();
173173

174-
if (\count($options->getIndexUids()) > 0) {
175-
$options->setIndexUids(array_merge([$this->uid], $options->getIndexUids()));
174+
if ($options->getIndexUids() !== []) {
175+
$options->setIndexUids([$this->uid, ...$options->getIndexUids()]);
176176
} else {
177177
$options->setIndexUids([$this->uid]);
178178
}

src/Http/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ private function execute(RequestInterface $request, array $headers = [])
159159

160160
private function buildQueryString(array $queryParams = []): string
161161
{
162-
return \count($queryParams) > 0 ? '?'.http_build_query($queryParams) : '';
162+
return $queryParams !== [] ? '?'.http_build_query($queryParams) : '';
163163
}
164164

165165
/**

0 commit comments

Comments
 (0)