diff --git a/src/OpenSearch/Client.php b/src/OpenSearch/Client.php index 324afcbb..2fc42e8f 100644 --- a/src/OpenSearch/Client.php +++ b/src/OpenSearch/Client.php @@ -1617,7 +1617,9 @@ 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); @@ -1880,9 +1882,6 @@ 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()) {