Skip to content

Commit

Permalink
Fix code style
Browse files Browse the repository at this point in the history
Signed-off-by: Kim Pepper <[email protected]>
  • Loading branch information
kimpepper committed Oct 24, 2024
1 parent e9bbfb9 commit be04c45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/OpenSearch/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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()) {
Expand Down

0 comments on commit be04c45

Please sign in to comment.