|
@@ -113,7 +113,7 @@ discard block |
|
|
block discarded – undo |
|
113
|
113
|
public function beforeSend(Server $server) |
|
114
|
114
|
{ |
|
115
|
115
|
$connection = sprintf('http://%s:%s/players.json', $server->ip, $server->port_query); |
|
116
|
|
- $this->PlayerList = (@file_get_contents($connection))?@file_get_contents($connection):"[]"; |
|
|
116
|
+ $this->PlayerList = (@file_get_contents($connection)) ? @file_get_contents($connection) : "[]"; |
|
117
|
117
|
} |
|
118
|
118
|
|
|
119
|
119
|
/** |
|
@@ -189,7 +189,7 @@ discard block |
|
|
block discarded – undo |
|
189
|
189
|
$players = []; |
|
190
|
190
|
$data = json_decode($this->PlayerList); |
|
191
|
191
|
foreach ($data as $player) { |
|
192
|
|
- $players[] = array("id"=>$player->id,"name"=>$player->name,"ping"=>$player->ping,"identifiers"=>$player->identifiers); |
|
|
192
|
+ $players[] = array( "id"=>$player->id, "name"=>$player->name, "ping"=>$player->ping, "identifiers"=>$player->identifiers ); |
|
193
|
193
|
} |
|
194
|
194
|
$result->add('players', $players); |
|
195
|
195
|
} |
Please login to merge, or discard this patch.