Skip to content

Commit

Permalink
Merge pull request #3
Browse files Browse the repository at this point in the history
Protocol issue fixed
  • Loading branch information
Gasjki authored May 15, 2023
2 parents 27bff0c + 58f258e commit 76e494b
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 📊 Game Server Query

Current version: **1.0.16**
Current version: **1.0.17**

### [Inspiration: GameQ by AustinB](https://github.com/Austinb/GameQ)

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gasjki/game-server-query",
"description": "GameServerQuery - Extended PHP game server query library based on GameQ.",
"version": "1.0.16",
"version": "1.0.17",
"type": "library",
"license": "LGPL-3.0+",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion src/GameServerQuery/Protocol/Games/Other/FiveMProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ protected function processPackets(Result $result, array $packets): array
}

$this->{$this->responses[$key]}($packet, $result);
\unset($key, $packet);
unset($key, $packet);
}

return $result->toArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ protected function extractPackets(array $data, string $serverChallenge): array
$packets[] = $buffer->getBuffer();

// Clear memory.
\unset($buffer, $header);
unset($buffer, $header);
}

return $packets;
Expand Down Expand Up @@ -211,7 +211,7 @@ protected function processPackets(Result $result, array $packets): array
}

$this->{$this->responses[$responseType]}($buffer, $result);
\unset($buffer, $responseType);
unset($buffer, $responseType);
}

return $result->toArray();
Expand Down
6 changes: 3 additions & 3 deletions src/GameServerQuery/Protocol/Types/GameSpy3Protocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected function preProcessPackets(array $packets): array
$packets[$x] = \substr(\str_replace($prefix, '', $packets[$x]), 2);
}

\unset($buffer);
unset($buffer);
}

return $packets;
Expand Down Expand Up @@ -215,9 +215,9 @@ protected function processPlayers(Buffer $buffer, Result $result): void
}
}

\unset($temporaryBuffer);
unset($temporaryBuffer);
}

\unset($data, $nbOfData, $itemGroup, $item);
unset($data, $nbOfData, $itemGroup, $item);
}
}
6 changes: 3 additions & 3 deletions src/GameServerQuery/Protocol/Types/SourceProtocol.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ protected function extractPackets(array $data): array
$packets[$packetId][] = $buffer->getBuffer();

// Clear memory.
\unset($buffer, $header, $packetId);
unset($buffer, $header, $packetId);
}

return $packets;
Expand Down Expand Up @@ -206,7 +206,7 @@ protected function processPackets(Result $result, array $packets): array
}

$this->{$this->responses[$responseType]}($buffer, $result);
\unset($buffer, $responseType);
unset($buffer, $responseType);
}

return $result->toArray();
Expand Down Expand Up @@ -288,7 +288,7 @@ protected function processSourceInformation(Buffer $buffer, Result $result): voi
}
}

\unset($EDFCheck);
unset($EDFCheck);
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/GameServerQuery/Query/Types/FiveMQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ public function execute(): array

// No response caught. Stop the process and go the next server (if any!).
if (!$responses) {
\unset($information, $players);
unset($information, $players);

return $result->toArray();
}

// Process all information and create a new Result object.
$response = $this->server->getProtocol()->handleResponse($result, $responses);

\unset($information, $players, $responses);
unset($information, $players, $responses);

return $response;
}
Expand Down
4 changes: 2 additions & 2 deletions src/GameServerQuery/Query/Types/GameSpy3Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $this->serverChallenge);
unset($information, $this->serverChallenge);

return $result->toArray();
}
Expand All @@ -53,7 +53,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $responses, $this->serverChallenge);
unset($information, $responses, $this->serverChallenge);

return $response;
}
Expand Down
4 changes: 2 additions & 2 deletions src/GameServerQuery/Query/Types/RaknetQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $this->serverChallenge);
unset($information, $this->serverChallenge);

return $result->toArray();
}
Expand All @@ -44,7 +44,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $responses, $this->serverChallenge);
unset($information, $responses, $this->serverChallenge);

return $response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($status, $players, $rules, $this->serverChallenge);
unset($status, $players, $rules, $this->serverChallenge);

return $result->toArray();
}
Expand All @@ -67,7 +67,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($status, $players, $rules, $responses, $this->serverChallenge);
unset($status, $players, $rules, $responses, $this->serverChallenge);

return $response;
}
Expand Down
4 changes: 2 additions & 2 deletions src/GameServerQuery/Query/Types/SourceQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $players, $rules, $this->serverChallenge);
unset($information, $players, $rules, $this->serverChallenge);

return $result->toArray();
}
Expand All @@ -58,7 +58,7 @@ public function execute(): array
// Close socket.
$socket->close();

\unset($information, $players, $rules, $responses, $this->serverChallenge);
unset($information, $players, $rules, $responses, $this->serverChallenge);

return $response;
}
Expand Down

0 comments on commit 76e494b

Please sign in to comment.