diff --git a/src/Channels/Channel.php b/src/Channels/Channel.php index 79dbac96..a68883ce 100644 --- a/src/Channels/Channel.php +++ b/src/Channels/Channel.php @@ -55,9 +55,12 @@ public function unsubscribe(Connection $connection): void $this->connections->remove($connection); } + /** + * Determine if the connection is subscribed to the channel. + */ public function subscribed(Connection $connection): bool { - return $this->connections->find($connection); + return $this->connections->find($connection) !== null; } /**