Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-05-18 12:35:35 +00:00 committed by StyleCI Bot
parent 2e006867f6
commit fa0f5f7331

View File

@ -40,7 +40,9 @@ trait MsgIdHandler
if (count($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages) > $this->settings['msg_array_limit']['outgoing']) { if (count($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages) > $this->settings['msg_array_limit']['outgoing']) {
reset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages); reset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages);
$key = key($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages); $key = key($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages);
if ($key[0] === "\0") $key = 'a'.$key; if ($key[0] === "\0") {
$key = 'a'.$key;
}
unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$key]); unset($this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages[$key]);
} }
$this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages['a'.strrev($new_message_id->toBytes())] = []; $this->datacenter->sockets[$aargs['datacenter']]->outgoing_messages['a'.strrev($new_message_id->toBytes())] = [];
@ -62,7 +64,9 @@ trait MsgIdHandler
if (count($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages) > $this->settings['msg_array_limit']['incoming']) { if (count($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages) > $this->settings['msg_array_limit']['incoming']) {
reset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages); reset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages);
$key = key($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages); $key = key($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages);
if ($key[0] === "\0") $key = 'a'.$key; if ($key[0] === "\0") {
$key = 'a'.$key;
}
unset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$key]); unset($this->datacenter->sockets[$aargs['datacenter']]->incoming_messages[$key]);
} }
$this->datacenter->sockets[$aargs['datacenter']]->incoming_messages['a'.strrev($new_message_id->toBytes())] = []; $this->datacenter->sockets[$aargs['datacenter']]->incoming_messages['a'.strrev($new_message_id->toBytes())] = [];