@@ -185,7 +185,42 @@ public function Ping( ) : bool
185185 * @throws InvalidPacketException
186186 * @throws SocketException
187187 *
188- * @return array Returns an array with information on success
188+ * @return array{
189+ * Protocol: int,
190+ * HostName: string,
191+ * Map: string,
192+ * ModDir: string,
193+ * ModDesc: string,
194+ * AppID?: int,
195+ * Players: int,
196+ * MaxPlayers: int,
197+ * Bots: int,
198+ * Dedicated: string,
199+ * Os: string,
200+ * Password: bool,
201+ * Secure: bool,
202+ * Version?: string,
203+ * ExtraDataFlags?: int,
204+ * GamePort?: int,
205+ * SteamID?: string|int,
206+ * SpecPort?: int,
207+ * SpecName?: string,
208+ * GameTags?: string,
209+ * GameID?: int,
210+ * Address?: string,
211+ * IsMod?: bool,
212+ * Mod?: array{
213+ * Url: string,
214+ * Download: string,
215+ * Version: int,
216+ * Size: int,
217+ * ServerSide: bool,
218+ * CustomDLL: bool
219+ * },
220+ * GameMode?: int,
221+ * WitnessCount?: int,
222+ * WitnessTime?: int
223+ * } Returns an array with server information on success
189224 */
190225 public function GetInfo ( ) : array
191226 {
@@ -364,7 +399,7 @@ public function GetInfo( ) : array
364399 * @throws InvalidPacketException
365400 * @throws SocketException
366401 *
367- * @return array Returns an array with players on success
402+ * @return array<int, array{Id: int, Name: string, Frags: int, Time: int, TimeF: string}> Returns an array with players on success
368403 */
369404 public function GetPlayers ( ) : array
370405 {
@@ -409,7 +444,7 @@ public function GetPlayers( ) : array
409444 * @throws InvalidPacketException
410445 * @throws SocketException
411446 *
412- * @return array Returns an array with rules on success
447+ * @return array<string, string> Returns an array with rules on success
413448 */
414449 public function GetRules ( ) : array
415450 {
@@ -438,7 +473,7 @@ public function GetRules( ) : array
438473 $ Rule = $ Buffer ->ReadNullTermString ( );
439474 $ Value = $ Buffer ->ReadNullTermString ( );
440475
441- if ( ! empty ( $ Rule ) )
476+ if ( strlen ( $ Rule ) > 0 )
442477 {
443478 $ Rules [ $ Rule ] = $ Value ;
444479 }
0 commit comments