Applied fixes from StyleCI

This commit is contained in:
Daniil Gentili 2016-08-09 17:32:43 -04:00 committed by StyleCI Bot
parent 9d4c53795b
commit 7794a5ab2d
3 changed files with 4 additions and 3 deletions

View File

@ -88,6 +88,7 @@ class Connection
if (!(get_resource_type($this->sock) == 'file' || get_resource_type($this->sock) == 'stream')) {
throw new Exception("Connection: couldn't connect to socket.");
}
return fwrite($this->sock, $what);
break;
default:

View File

@ -105,7 +105,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
*/
public function send_message($message_data)
{
switch ($this->settings["protocol"]) {
switch ($this->settings['protocol']) {
case 'tcp_full':
$message_id = $this->struct->pack('<Q', (int) ((time() + $this->timedelta) * pow(2, 30)) * 4);
if (($this->auth_key == null) || ($this->server_salt == null)) {
@ -134,7 +134,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
*/
public function recv_message()
{
switch ($this->settings["protocol"]) {
switch ($this->settings['protocol']) {
case 'tcp_full':
$packet_length_data = $this->sock->read(4);
if (strlen($packet_length_data) < 4) {

View File

@ -16,7 +16,7 @@ class TL
{
public function __construct($filename)
{
if(is_array($filename)) {
if (is_array($filename)) {
$TL_dict = [];
foreach ($filename as $file) {
$TL_dict = array_replace(json_decode(file_get_contents($file), true), $TL_dict);