Replaced array() with []

This commit is contained in:
Shoghi Cervantes
2014-08-28 17:04:22 +02:00
parent 2f2afe2336
commit eab86f5f90
122 changed files with 535 additions and 533 deletions

View File

@ -66,7 +66,7 @@ class RCON{
}
@socket_getsockname($this->socket, $addr, $port);
$this->server->getLogger()->info("RCON running on $addr:$port");
$this->server->getScheduler()->scheduleRepeatingTask(new CallbackTask(array($this, "check")), 3);
$this->server->getScheduler()->scheduleRepeatingTask(new CallbackTask([$this, "check"]), 3);
}
public function stop(){

View File

@ -85,7 +85,7 @@ class RCONInstance extends \Thread{
while($this->stop !== true){
usleep(2000);
$r = array($socket = $this->socket);
$r = [$socket = $this->socket];
$w = null;
$e = null;
if(socket_select($r, $w, $e, 0) === 1){
@ -163,7 +163,7 @@ class RCONInstance extends \Thread{
}
usleep(1);
}else{
@socket_set_option($client, SOL_SOCKET, SO_LINGER, array("l_onoff" => 1, "l_linger" => 1));
@socket_set_option($client, SOL_SOCKET, SO_LINGER, ["l_onoff" => 1, "l_linger" => 1]);
@socket_shutdown($client, 2);
@socket_set_block($client);
@socket_read($client, 1);