Skip to content

Commit b9d25fb

Browse files
committed
Tweak method name
1 parent 0ef23f7 commit b9d25fb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Factories/SearchRequestFactory.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ protected function reverseSort(array $sort): array
158158

159159
foreach ($sort as $field => $definition) {
160160
if (is_string($definition)) {
161-
$sort[$field] = $this->reverseDirection($definition);
161+
$sort[$field] = $this->reverseSortDirection($definition);
162162

163163
continue;
164164
}
165165

166166
if (is_array($definition)) {
167-
$sort[$field]['order'] = $this->reverseDirection($definition['order'] ?? 'asc');
167+
$sort[$field]['order'] = $this->reverseSortDirection($definition['order'] ?? 'asc');
168168
}
169169
}
170170

@@ -175,7 +175,7 @@ protected function reverseSort(array $sort): array
175175
/**
176176
* Reverse an OpenSearch sort direction.
177177
*/
178-
protected function reverseDirection(string $direction): string
178+
protected function reverseSortDirection(string $direction): string
179179
{
180180
return strtolower($direction) === 'asc' ? 'desc' : 'asc';
181181
}

0 commit comments

Comments
 (0)