Skip to content

Commit

Permalink
Update performRequest return type to iterable
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Pepper <[email protected]>
  • Loading branch information
kimpepper committed Feb 25, 2025
1 parent c9b50b2 commit 84e3613
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/OpenSearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@ public function request(
string $method,
string $uri,
array $attributes = []
): array|string|null {
): iterable|string|null {
$params = $attributes['params'] ?? [];
$body = $attributes['body'] ?? null;
$options = $attributes['options'] ?? [];
Expand Down
4 changes: 2 additions & 2 deletions util/template/client-class
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class Client
string $method,
string $uri,
array $attributes = []
): array|string|null {
): iterable|string|null {
$params = $attributes['params'] ?? [];
$body = $attributes['body'] ?? null;
$options = $attributes['options'] ?? [];
Expand All @@ -173,7 +173,7 @@ class Client
* @throws \Psr\Http\Client\ClientExceptionInterface
* @throws \OpenSearch\Exception\HttpExceptionInterface
*/
private function performRequest(AbstractEndpoint $endpoint): array|string|null
private function performRequest(AbstractEndpoint $endpoint): iterable|string|null
{
return $this->httpTransport->sendRequest(
$endpoint->getMethod(),
Expand Down

0 comments on commit 84e3613

Please sign in to comment.