From f55bfe87ddb0b90fb651dbcc95b3b810e4086309 Mon Sep 17 00:00:00 2001 From: yaozm Date: Tue, 9 Jul 2024 18:31:36 +0800 Subject: [PATCH] style(src/Foundation/Client.php): Remove redundant method declaration - Removed redundant method declaration sendAsync - Updated comments for clarity and consistency --- src/Foundation/Client.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Foundation/Client.php b/src/Foundation/Client.php index 05a2344..c950da1 100644 --- a/src/Foundation/Client.php +++ b/src/Foundation/Client.php @@ -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 @@ -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())), + ); + } }