From 5e996548a97228d80961f3d9a835e0ab483cea66 Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 22 May 2022 15:50:16 +0200 Subject: [PATCH 1/3] Update Buffer.php --- src/GameQ/Buffer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/GameQ/Buffer.php b/src/GameQ/Buffer.php index 421319f9..8c5a0e43 100644 --- a/src/GameQ/Buffer.php +++ b/src/GameQ/Buffer.php @@ -519,7 +519,8 @@ private static function extendBinaryString($input, $length = 4, $littleEndian = } } - private static function isLittleEndian() { + private static function isLittleEndian() + { $testint = 0x00FF; $p = pack('S', $testint); return $testint===current(unpack('v', $p)); From 73ebb14cf83b989d349b92a22628f9b3af3c969b Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 22 May 2022 15:51:24 +0200 Subject: [PATCH 2/3] Update Arma3.php Remove end of line whitespaces --- src/GameQ/Protocols/Arma3.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GameQ/Protocols/Arma3.php b/src/GameQ/Protocols/Arma3.php index b97ff6a9..fdc2cba4 100644 --- a/src/GameQ/Protocols/Arma3.php +++ b/src/GameQ/Protocols/Arma3.php @@ -57,7 +57,7 @@ class Arma3 extends Source /** * DLC Flags/Bits as defined in the documentation. - * + * * @see https://community.bistudio.com/wiki/Arma_3:_ServerBrowserProtocol3 * * @var array @@ -178,7 +178,7 @@ protected function processRules(Buffer $buffer) // Loop over the mods while ($modCount) { - // Read the mods hash + // Read the mods hash $result->addSub('mods', 'hash', dechex($responseBuffer->readInt32())); // Get the information byte containing DLC flag and steamId length From ec0cc017ce23e3b187220b54e751b494d1f2242b Mon Sep 17 00:00:00 2001 From: Patrick Date: Sun, 22 May 2022 15:52:56 +0200 Subject: [PATCH 3/3] Update Buffer.php --- src/GameQ/Buffer.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/GameQ/Buffer.php b/src/GameQ/Buffer.php index 8c5a0e43..a080e427 100644 --- a/src/GameQ/Buffer.php +++ b/src/GameQ/Buffer.php @@ -521,8 +521,6 @@ private static function extendBinaryString($input, $length = 4, $littleEndian = private static function isLittleEndian() { - $testint = 0x00FF; - $p = pack('S', $testint); - return $testint===current(unpack('v', $p)); + return 0x00FF === current(unpack('v', pack('S', 0x00FF))); } }