From 214620454419e19e007fc62b05961bf81060947a Mon Sep 17 00:00:00 2001 From: Evgeny Zinoviev Date: Tue, 2 Mar 2021 23:57:41 +0300 Subject: code fixes here and there --- src/Client.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Client.php b/src/Client.php index 1756c6c..d1f8b7b 100644 --- a/src/Client.php +++ b/src/Client.php @@ -176,7 +176,7 @@ class Client { /** * @param string $raw_string - * @return RequestMessage|ResponseMessage + * @return RequestMessage|ResponseMessage|PingMessage|PongMessage * @throws \Exception */ protected static function parseMessage(string $raw_string) { @@ -225,11 +225,9 @@ class Client { case Message::PING: return new PingMessage(); - break; case Message::PONG: return new PongMessage(); - break; default: throw new \Exception("Malformed message: unexpected type {$type}"); @@ -239,7 +237,7 @@ class Client { /** * @param mixed $data * @param array $schema - * @return bool + * @throws \Exception */ protected static function validateData($data, array $schema) { if (!$data || !is_array($data)) @@ -294,7 +292,7 @@ class Client { } /** - * @return bool + * Close connection. */ public function close() { if (!$this->sock) -- cgit v1.2.3