Skip to content

Commit

Permalink
style(src/Foundation/Client.php): Remove redundant method declaration
Browse files Browse the repository at this point in the history
- Removed redundant method declaration sendAsync
- Updated comments for clarity and consistency
  • Loading branch information
guanguans committed Jul 9, 2024
1 parent be01512 commit f55bfe8
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/Foundation/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,6 @@ public function send(Message $message): ResponseInterface
return $this->synchronous(true)->sendAsync($message)->wait();
}

/**
* @throws GuzzleException
*/
public function sendAsync(Message $message): PromiseInterface
{
return $this->getHttpClient()->requestAsync(
$message->toHttpMethod(),
$message->toHttpUri(),
$this->normalizeHttpOptions($this->authenticator->applyToOptions($message->toHttpOptions())),
);
}

/**
* @see https://docs.guzzlephp.org/en/stable/quickstart.html#concurrent-requests
* @see \GuzzleHttp\Pool
Expand All @@ -97,4 +85,16 @@ public function pool(iterable $messages): array
})($messages)
);
}

/**
* @throws GuzzleException
*/
public function sendAsync(Message $message): PromiseInterface
{
return $this->getHttpClient()->requestAsync(
$message->toHttpMethod(),
$message->toHttpUri(),
$this->normalizeHttpOptions($this->authenticator->applyToOptions($message->toHttpOptions())),
);
}
}

0 comments on commit f55bfe8

Please sign in to comment.