From 2be106896eabcf2254524aed42624da80aa49155 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=2E=E5=94=90?= Date: Tue, 11 Feb 2025 10:27:48 +0800 Subject: [PATCH 1/2] EventStream add return value --- src/Http/EventStream.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Http/EventStream.php b/src/Http/EventStream.php index 04ac268..abab05b 100644 --- a/src/Http/EventStream.php +++ b/src/Http/EventStream.php @@ -30,10 +30,9 @@ public function __construct(protected Writable $connection, ?ResponseInterface $ } } - public function write(string $data): self + public function write(string $data): bool { - $this->connection->write($data); - return $this; + return $this->connection->write($data); } public function end(): void From 46552d65f329040c5907356a1cb61c09856d5715 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=2E=E5=94=90?= Date: Tue, 11 Feb 2025 10:38:35 +0800 Subject: [PATCH 2/2] add end value --- src/Http/EventStream.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Http/EventStream.php b/src/Http/EventStream.php index abab05b..dfde190 100644 --- a/src/Http/EventStream.php +++ b/src/Http/EventStream.php @@ -35,8 +35,8 @@ public function write(string $data): bool return $this->connection->write($data); } - public function end(): void + public function end(): ?bool { - $this->connection->end(); + return $this->connection->end(); } }