From 418dfd4050f4953f5bc898818c6cf0a68f383b74 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 18 Oct 2015 22:06:52 +0300 Subject: [PATCH] Document additional throws and fix return --- SourceQuery/SourceQuery.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/SourceQuery/SourceQuery.php b/SourceQuery/SourceQuery.php index ab7e12a..fa89e54 100644 --- a/SourceQuery/SourceQuery.php +++ b/SourceQuery/SourceQuery.php @@ -192,6 +192,7 @@ * Sends ping packet to the server * NOTE: This may not work on some games (TF2 for example) * + * @throws InvalidPacketException * @throws SocketException * * @return bool True on success, false on failure @@ -483,10 +484,10 @@ * * @param $Header * @param $ExpectedResult - * + * * @throws InvalidPacketException - * - * @return bool True if all went well, false if server uses old GoldSource protocol, and it already contains answer + * + * @return int Returns one of the GETCHALLENGE_* constants */ private function GetChallenge( $Header, $ExpectedResult ) { @@ -536,6 +537,7 @@ * @param string $Password Rcon Password * * @throws AuthenticationException + * @throws InvalidPacketException * @throws SocketException * * @return bool True on success, false on failure @@ -576,6 +578,7 @@ * @param string $Command Command to execute * * @throws AuthenticationException + * @throws InvalidPacketException * @throws SocketException * * @return string|bool Answer from server in string, false on failure