File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments