Applied fixes from StyleCI
This commit is contained in:
parent
67de600bb8
commit
84d25bfaa2
@ -42,7 +42,7 @@ class DataCenter extends Tools
|
|||||||
public function dc_disconnect($dc_number)
|
public function dc_disconnect($dc_number)
|
||||||
{
|
{
|
||||||
if (isset($this->sockets[$dc_number])) {
|
if (isset($this->sockets[$dc_number])) {
|
||||||
\danog\MadelineProto\Logging::log("Disconnecting from DC ".$dc_number."...");
|
\danog\MadelineProto\Logging::log('Disconnecting from DC '.$dc_number.'...');
|
||||||
unset($this->sockets[$dc_number]);
|
unset($this->sockets[$dc_number]);
|
||||||
unset($this->curdc);
|
unset($this->curdc);
|
||||||
}
|
}
|
||||||
@ -53,7 +53,7 @@ class DataCenter extends Tools
|
|||||||
if (isset($this->sockets[$dc_number])) {
|
if (isset($this->sockets[$dc_number])) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
\danog\MadelineProto\Logging::log("Connecting to DC ".$dc_number."...");
|
\danog\MadelineProto\Logging::log('Connecting to DC '.$dc_number.'...');
|
||||||
|
|
||||||
if ($settings == []) {
|
if ($settings == []) {
|
||||||
$settings = $this->settings[$dc_number];
|
$settings = $this->settings[$dc_number];
|
||||||
|
@ -20,6 +20,7 @@ class Logging
|
|||||||
public static $mode = null;
|
public static $mode = null;
|
||||||
public static $optional = null;
|
public static $optional = null;
|
||||||
public static $constructed = false;
|
public static $constructed = false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Constructor function
|
* Constructor function
|
||||||
* Accepts various logging modes:
|
* Accepts various logging modes:
|
||||||
@ -31,7 +32,7 @@ class Logging
|
|||||||
public static function constructor($mode, $optional = null)
|
public static function constructor($mode, $optional = null)
|
||||||
{
|
{
|
||||||
if ($mode == null) {
|
if ($mode == null) {
|
||||||
throw new Exception("No mode was specified!");
|
throw new Exception('No mode was specified!');
|
||||||
}
|
}
|
||||||
self::$mode = (string) $mode;
|
self::$mode = (string) $mode;
|
||||||
self::$optional = $optional;
|
self::$optional = $optional;
|
||||||
|
@ -64,7 +64,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
|||||||
'test_mode' => true,
|
'test_mode' => true,
|
||||||
'port' => '443',
|
'port' => '443',
|
||||||
],
|
],
|
||||||
'default_dc' => 2
|
'default_dc' => 2,
|
||||||
],
|
],
|
||||||
'app_info' => [
|
'app_info' => [
|
||||||
'api_id' => 25628,
|
'api_id' => 25628,
|
||||||
@ -152,7 +152,7 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
|||||||
{
|
{
|
||||||
\danog\MadelineProto\Logging::log('Writing client info...');
|
\danog\MadelineProto\Logging::log('Writing client info...');
|
||||||
$nearestDc = $this->method_call(
|
$nearestDc = $this->method_call(
|
||||||
'invokeWithLayer',
|
'invokeWithLayer',
|
||||||
[
|
[
|
||||||
'layer' => $this->settings['tl_schema']['layer'],
|
'layer' => $this->settings['tl_schema']['layer'],
|
||||||
'query' => $this->tl->serialize_method('initConnection',
|
'query' => $this->tl->serialize_method('initConnection',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user