Applied fixes from StyleCI
This commit is contained in:
parent
f3f7772f6e
commit
737c4e286b
@ -21,8 +21,8 @@ class API extends Tools
|
||||
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
||||
$this->session = new MTProto($params);
|
||||
$ping_res = $this->ping(3);
|
||||
if(isset($ping["_"]) && $ping["_"] == "pong") {
|
||||
$this->log->log("Pong: ".$ping["ping_id"]);
|
||||
if (isset($ping['_']) && $ping['_'] == 'pong') {
|
||||
$this->log->log('Pong: '.$ping['ping_id']);
|
||||
}
|
||||
$future_salts = $this->get_future_salts(3);
|
||||
}
|
||||
|
@ -142,11 +142,11 @@ Slv8kg9qv1m6XHVQY3PnEw+QQtqSIXklHwIDAQAB
|
||||
)
|
||||
),
|
||||
]);
|
||||
$this->log->log("Current dc is ".$nearestDc["this_dc"].", nearest dc is ".$nearestDc["nearest_dc"]." in ".$nearestDc["country"].".");
|
||||
|
||||
if ($nearestDc["nearest_dc"] != $nearestDc["this_dc"]) {
|
||||
$this->log->log("Switching to dc ".$nearestDc["nearest_dc"]."...");
|
||||
$this->connection->dc_connect($nearestDc["nearest_dc"]);
|
||||
$this->log->log('Current dc is '.$nearestDc['this_dc'].', nearest dc is '.$nearestDc['nearest_dc'].' in '.$nearestDc['country'].'.');
|
||||
|
||||
if ($nearestDc['nearest_dc'] != $nearestDc['this_dc']) {
|
||||
$this->log->log('Switching to dc '.$nearestDc['nearest_dc'].'...');
|
||||
$this->connection->dc_connect($nearestDc['nearest_dc']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -159,10 +159,11 @@ class TL
|
||||
case '!X':
|
||||
return $value;
|
||||
case 'Vector t':
|
||||
$concat = \danog\PHP\Struct::pack('<i', $this->constructor_type["vector"]->id);
|
||||
$concat = \danog\PHP\Struct::pack('<i', $this->constructor_type['vector']->id);
|
||||
foreach ($value as $curv) {
|
||||
$concat .= $this->serialize_param($subtype, null, $curv);
|
||||
}
|
||||
|
||||
return $concat;
|
||||
default:
|
||||
throw new Exception("Couldn't serialize param with type ".$type_);
|
||||
|
Loading…
Reference in New Issue
Block a user