From 5c076e4c7f3d744d662a95f50b511f22b928394c Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Thu, 28 Dec 2023 17:15:20 -0600 Subject: [PATCH] Update exception docblocks --- src/WebsocketMessage.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/WebsocketMessage.php b/src/WebsocketMessage.php index 35cf65c..3644ae4 100644 --- a/src/WebsocketMessage.php +++ b/src/WebsocketMessage.php @@ -68,7 +68,7 @@ public function isBinary(): bool } /** - * @throws StreamException + * @throws WebsocketClosedException */ public function read(?Cancellation $cancellation = null): ?string { @@ -79,7 +79,7 @@ public function read(?Cancellation $cancellation = null): ?string * Buffer the entire message contents. Note that the given size limit may not be reached if a smaller message size * limit has been imposed by {@see Rfc6455Client::$messageSizeLimit}. * - * @throws BufferException|StreamException + * @throws WebsocketClosedException|BufferException * @see Payload::buffer() */ public function buffer(?Cancellation $cancellation = null, int $limit = \PHP_INT_MAX): string @@ -116,7 +116,10 @@ public function getIterator(): \Traversable } /** - * @throws BufferException|StreamException + * Buffers entire stream before returning. Use {@see self::buffer()} to optionally provide a {@see Cancellation} + * and/or length limit. + * + * @throws WebsocketClosedException|BufferException */ public function __toString(): string {