From be04c45499b0cf8250fb072fe38a8ee5049567eb Mon Sep 17 00:00:00 2001 From: Kim Pepper Date: Thu, 24 Oct 2024 18:53:47 +1100 Subject: [PATCH] Fix code style Signed-off-by: Kim Pepper --- src/OpenSearch/Client.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 2fc42e8f..324afcbb 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -1617,9 +1617,7 @@ public function create(array $params = []) $index = $this->extractArgument($params, 'index'); $body = $this->extractArgument($params, 'body'); - $endpoint = $id ? - $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Create::class) - : $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Index::class); + $endpoint = $id ? $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Create::class) : $this->endpointFactory->getEndpoint(\OpenSearch\Endpoints\Index::class); $endpoint->setParams($params); $endpoint->setId($id); $endpoint->setIndex($index); @@ -1882,6 +1880,9 @@ public function setAsync(bool $isAsync): static */ public function sendRawRequest(string $method, string $uri, array $params = [], ?string $body = null): Promise|ResponseInterface { + $params = $attributes['params'] ?? []; + $body = $attributes['body'] ?? null; + $request = $this->transport->createRequest($method, $uri, $params, $body); if ($this->isAsync()) {