@@ -240,8 +240,8 @@ public function GetInfo( ) : array
240240 $ Server [ 'Players ' ] = $ Buffer ->GetByte ( );
241241 $ Server [ 'MaxPlayers ' ] = $ Buffer ->GetByte ( );
242242 $ Server [ 'Protocol ' ] = $ Buffer ->GetByte ( );
243- $ Server [ 'Dedicated ' ] = Chr ( $ Buffer ->GetByte ( ) );
244- $ Server [ 'Os ' ] = Chr ( $ Buffer ->GetByte ( ) );
243+ $ Server [ 'Dedicated ' ] = chr ( $ Buffer ->GetByte ( ) );
244+ $ Server [ 'Os ' ] = chr ( $ Buffer ->GetByte ( ) );
245245 $ Server [ 'Password ' ] = $ Buffer ->GetByte ( ) === 1 ;
246246 $ Server [ 'IsMod ' ] = $ Buffer ->GetByte ( ) === 1 ;
247247
@@ -266,7 +266,7 @@ public function GetInfo( ) : array
266266
267267 if ( $ Type !== self ::S2A_INFO_SRC )
268268 {
269- throw new InvalidPacketException ( 'GetInfo: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
269+ throw new InvalidPacketException ( 'GetInfo: Packet header mismatch. (0x ' . dechex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
270270 }
271271
272272 $ Server [ 'Protocol ' ] = $ Buffer ->GetByte ( );
@@ -278,8 +278,8 @@ public function GetInfo( ) : array
278278 $ Server [ 'Players ' ] = $ Buffer ->GetByte ( );
279279 $ Server [ 'MaxPlayers ' ] = $ Buffer ->GetByte ( );
280280 $ Server [ 'Bots ' ] = $ Buffer ->GetByte ( );
281- $ Server [ 'Dedicated ' ] = Chr ( $ Buffer ->GetByte ( ) );
282- $ Server [ 'Os ' ] = Chr ( $ Buffer ->GetByte ( ) );
281+ $ Server [ 'Dedicated ' ] = chr ( $ Buffer ->GetByte ( ) );
282+ $ Server [ 'Os ' ] = chr ( $ Buffer ->GetByte ( ) );
283283 $ Server [ 'Password ' ] = $ Buffer ->GetByte ( ) === 1 ;
284284 $ Server [ 'Secure ' ] = $ Buffer ->GetByte ( ) === 1 ;
285285
@@ -390,7 +390,7 @@ public function GetPlayers( ) : array
390390
391391 if ( $ Type !== self ::S2A_PLAYER )
392392 {
393- throw new InvalidPacketException ( 'GetPlayers: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
393+ throw new InvalidPacketException ( 'GetPlayers: Packet header mismatch. (0x ' . dechex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
394394 }
395395
396396 $ Players = [];
@@ -403,7 +403,7 @@ public function GetPlayers( ) : array
403403 $ Player [ 'Name ' ] = $ Buffer ->GetString ( );
404404 $ Player [ 'Frags ' ] = $ Buffer ->GetLong ( );
405405 $ Player [ 'Time ' ] = (int )$ Buffer ->GetFloat ( );
406- $ Player [ 'TimeF ' ] = GMDate ( ( $ Player [ 'Time ' ] > 3600 ? " H:i:s " : " i:s " ), $ Player [ 'Time ' ] );
406+ $ Player [ 'TimeF ' ] = gmdate ( ( $ Player [ 'Time ' ] > 3600 ? ' H:i:s ' : ' i:s ' ), $ Player [ 'Time ' ] );
407407
408408 $ Players [ ] = $ Player ;
409409 }
@@ -435,7 +435,7 @@ public function GetRules( ) : array
435435
436436 if ( $ Type !== self ::S2A_RULES )
437437 {
438- throw new InvalidPacketException ( 'GetRules: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
438+ throw new InvalidPacketException ( 'GetRules: Packet header mismatch. (0x ' . dechex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
439439 }
440440
441441 $ Rules = [];
@@ -446,7 +446,7 @@ public function GetRules( ) : array
446446 $ Rule = $ Buffer ->GetString ( );
447447 $ Value = $ Buffer ->GetString ( );
448448
449- if ( !Empty ( $ Rule ) )
449+ if ( !empty ( $ Rule ) )
450450 {
451451 $ Rules [ $ Rule ] = $ Value ;
452452 }
@@ -497,7 +497,7 @@ private function GetChallenge( int $Header, int $ExpectedResult ) : void
497497 }
498498 default :
499499 {
500- throw new InvalidPacketException ( 'GetChallenge: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
500+ throw new InvalidPacketException ( 'GetChallenge: Packet header mismatch. (0x ' . dechex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
501501 }
502502 }
503503 }
0 commit comments