RakLibInterface: move array initialization to default value

doesn't make sense to do this in the ctor when all the others are normal
This commit is contained in:
Dylan K. Taylor 2017-09-18 09:34:00 +01:00
parent a99eee9def
commit 1e4cbb0dd9

View File

@ -54,7 +54,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
private $players = [];
/** @var string[] */
private $identifiers;
private $identifiers = [];
/** @var int[] */
private $identifiersACK = [];
@ -63,9 +63,7 @@ class RakLibInterface implements ServerInstance, AdvancedSourceInterface{
private $interface;
public function __construct(Server $server){
$this->server = $server;
$this->identifiers = [];
$this->rakLib = new RakLibServer($this->server->getLogger(), $this->server->getLoader(), $this->server->getPort(), $this->server->getIp() === "" ? "0.0.0.0" : $this->server->getIp(), false);
$this->interface = new ServerHandler($this->rakLib, $this);