@@ -138,7 +138,7 @@ public function __destruct( )
138138 * @throws InvalidArgumentException
139139 * @throws TimeoutException
140140 */
141- public function Connect ( $ Ip , $ Port , $ Timeout = 3 , $ Engine = self :: SOURCE )
141+ public function Connect ( $ Ip , $ Port , $ Timeout = 3 , $ Engine = self :: SOURCE )
142142 {
143143 $ this ->Disconnect ( );
144144
@@ -204,10 +204,10 @@ public function Ping( )
204204 return false ;
205205 }
206206
207- $ this ->Socket ->Write ( self :: A2S_PING );
207+ $ this ->Socket ->Write ( self :: A2S_PING );
208208 $ this ->Socket ->Read ( );
209209
210- return $ this ->Buffer ->GetByte ( ) === self :: S2A_PING ;
210+ return $ this ->Buffer ->GetByte ( ) === self :: S2A_PING ;
211211 }
212212
213213 /**
@@ -224,7 +224,7 @@ public function GetInfo( )
224224 return false ;
225225 }
226226
227- $ this ->Socket ->Write ( self :: A2S_INFO , "Source Engine Query \0" );
227+ $ this ->Socket ->Write ( self :: A2S_INFO , "Source Engine Query \0" );
228228 $ this ->Socket ->Read ( );
229229
230230 $ Type = $ this ->Buffer ->GetByte ( );
@@ -235,7 +235,7 @@ public function GetInfo( )
235235 }
236236
237237 // Old GoldSource protocol, HLTV still uses it
238- if ( $ Type === self :: S2A_INFO_OLD && $ this ->Socket ->Engine === self :: GOLDSOURCE )
238+ if ( $ Type === self :: S2A_INFO_OLD && $ this ->Socket ->Engine === self :: GOLDSOURCE )
239239 {
240240 /**
241241 * If we try to read data again, and we get the result with type S2A_INFO (0x49)
@@ -278,7 +278,7 @@ public function GetInfo( )
278278 return $ Server ;
279279 }
280280
281- if ( $ Type !== self :: S2A_INFO )
281+ if ( $ Type !== self :: S2A_INFO )
282282 {
283283 throw new InvalidPacketException ( 'GetInfo: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
284284 }
@@ -367,15 +367,15 @@ public function GetPlayers( )
367367 return false ;
368368 }
369369
370- switch ( $ this ->GetChallenge ( self :: A2S_PLAYER , self :: S2A_PLAYER ) )
370+ switch ( $ this ->GetChallenge ( self :: A2S_PLAYER , self :: S2A_PLAYER ) )
371371 {
372- case self :: GETCHALLENGE_FAILED :
372+ case self :: GETCHALLENGE_FAILED :
373373 {
374374 return false ;
375375 }
376- case self :: GETCHALLENGE_ALL_CLEAR :
376+ case self :: GETCHALLENGE_ALL_CLEAR :
377377 {
378- $ this ->Socket ->Write ( self :: A2S_PLAYER , $ this ->Challenge );
378+ $ this ->Socket ->Write ( self :: A2S_PLAYER , $ this ->Challenge );
379379 $ this ->Socket ->Read ( 14000 ); // Moronic Arma 3 developers do not split their packets, so we have to read more data
380380 // This violates the protocol spec, and they probably should fix it: https://developer.valvesoftware.com/wiki/Server_queries#Protocol
381381
@@ -385,7 +385,7 @@ public function GetPlayers( )
385385 {
386386 return false ;
387387 }
388- else if ( $ Type !== self :: S2A_PLAYER )
388+ else if ( $ Type !== self :: S2A_PLAYER )
389389 {
390390 throw new InvalidPacketException ( 'GetPlayers: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
391391 }
@@ -425,15 +425,15 @@ public function GetRules( )
425425 return false ;
426426 }
427427
428- switch ( $ this ->GetChallenge ( self :: A2S_RULES , self :: S2A_RULES ) )
428+ switch ( $ this ->GetChallenge ( self :: A2S_RULES , self :: S2A_RULES ) )
429429 {
430- case self :: GETCHALLENGE_FAILED :
430+ case self :: GETCHALLENGE_FAILED :
431431 {
432432 return false ;
433433 }
434- case self :: GETCHALLENGE_ALL_CLEAR :
434+ case self :: GETCHALLENGE_ALL_CLEAR :
435435 {
436- $ this ->Socket ->Write ( self :: A2S_RULES , $ this ->Challenge );
436+ $ this ->Socket ->Write ( self :: A2S_RULES , $ this ->Challenge );
437437 $ this ->Socket ->Read ( );
438438
439439 $ Type = $ this ->Buffer ->GetByte ( );
@@ -442,7 +442,7 @@ public function GetRules( )
442442 {
443443 return false ;
444444 }
445- else if ( $ Type !== self :: S2A_RULES )
445+ else if ( $ Type !== self :: S2A_RULES )
446446 {
447447 throw new InvalidPacketException ( 'GetRules: Packet header mismatch. (0x ' . DecHex ( $ Type ) . ') ' , InvalidPacketException::PACKET_HEADER_MISMATCH );
448448 }
@@ -480,12 +480,12 @@ private function GetChallenge( $Header, $ExpectedResult )
480480 {
481481 if ( $ this ->Challenge )
482482 {
483- return self :: GETCHALLENGE_ALL_CLEAR ;
483+ return self :: GETCHALLENGE_ALL_CLEAR ;
484484 }
485485
486486 if ( $ this ->UseOldGetChallengeMethod )
487487 {
488- $ Header = self :: A2S_SERVERQUERY_GETCHALLENGE ;
488+ $ Header = self :: A2S_SERVERQUERY_GETCHALLENGE ;
489489 }
490490
491491 $ this ->Socket ->Write ( $ Header , 0xFFFFFFFF );
@@ -495,21 +495,21 @@ private function GetChallenge( $Header, $ExpectedResult )
495495
496496 switch ( $ Type )
497497 {
498- case self :: S2A_CHALLENGE :
498+ case self :: S2A_CHALLENGE :
499499 {
500500 $ this ->Challenge = $ this ->Buffer ->Get ( 4 );
501501
502- return self :: GETCHALLENGE_ALL_CLEAR ;
502+ return self :: GETCHALLENGE_ALL_CLEAR ;
503503 }
504504 case $ ExpectedResult :
505505 {
506506 // Goldsource (HLTV)
507507
508- return self :: GETCHALLENGE_CONTAINS_ANSWER ;
508+ return self :: GETCHALLENGE_CONTAINS_ANSWER ;
509509 }
510510 case 0 :
511511 {
512- return self :: GETCHALLENGE_FAILED ;
512+ return self :: GETCHALLENGE_FAILED ;
513513 }
514514 default :
515515 {
@@ -534,13 +534,13 @@ public function SetRconPassword( $Password )
534534
535535 switch ( $ this ->Socket ->Engine )
536536 {
537- case SourceQuery :: GOLDSOURCE :
537+ case SourceQuery:: GOLDSOURCE :
538538 {
539539 $ this ->Rcon = new GoldSourceRcon ( $ this ->Buffer , $ this ->Socket );
540540
541541 break ;
542542 }
543- case SourceQuery :: SOURCE :
543+ case SourceQuery:: SOURCE :
544544 {
545545 $ this ->Rcon = new SourceRcon ( $ this ->Buffer , $ this ->Socket );
546546
0 commit comments