Apply fixes from StyleCI
This commit is contained in:
parent
34865686da
commit
7515530b37
@ -77,7 +77,6 @@ foreach ($TL->methods->method as $key => $method) {
|
||||
$types[$real_type]['methods'][] = $key;
|
||||
}
|
||||
|
||||
|
||||
$params = '';
|
||||
foreach ($TL->methods->params[$key] as $param) {
|
||||
if (in_array($param['name'], ['flags', 'random_id'])) {
|
||||
|
@ -59,5 +59,4 @@ class API extends APIFactory
|
||||
$this->{$namespace} = new APIFactory($namespace, $this->API);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -53,5 +53,4 @@ trait PeerHandler
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -72,10 +72,18 @@ trait ResponseHandler
|
||||
$response = $this->datacenter->incoming_messages[$current_msg_id]['content'];
|
||||
\danog\MadelineProto\Logger::log('Received '.$response['_'].'.');
|
||||
|
||||
if (isset($response['users'])) $this->add_users($response['users']);
|
||||
if (isset($response['chats'])) $this->add_chats($response['chats']);
|
||||
if (isset($response['result']['users'])) $this->add_users($response['result']['users']);
|
||||
if (isset($response['result']['chats'])) $this->add_chats($response['result']['chats']);
|
||||
if (isset($response['users'])) {
|
||||
$this->add_users($response['users']);
|
||||
}
|
||||
if (isset($response['chats'])) {
|
||||
$this->add_chats($response['chats']);
|
||||
}
|
||||
if (isset($response['result']['users'])) {
|
||||
$this->add_users($response['result']['users']);
|
||||
}
|
||||
if (isset($response['result']['chats'])) {
|
||||
$this->add_chats($response['result']['chats']);
|
||||
}
|
||||
switch ($response['_']) {
|
||||
case 'msgs_ack':
|
||||
foreach ($response['msg_ids'] as $msg_id) {
|
||||
@ -119,7 +127,9 @@ trait ResponseHandler
|
||||
\danog\MadelineProto\Logger::log('new session created');
|
||||
\danog\MadelineProto\Logger::log($response);
|
||||
unset($this->datacenter->new_incoming[$current_msg_id]);
|
||||
if ($this->datacenter->authorized) $this->get_updates_state();
|
||||
if ($this->datacenter->authorized) {
|
||||
$this->get_updates_state();
|
||||
}
|
||||
break;
|
||||
case 'msg_container':
|
||||
|
||||
|
@ -70,7 +70,7 @@ trait UpdateHandler
|
||||
case 'updateShortMessage':
|
||||
case 'updateShortChatMessage':
|
||||
case 'updateShortSentMessage':
|
||||
$update = ['_' => 'updateNewMessage',];
|
||||
$update = ['_' => 'updateNewMessage'];
|
||||
$this->handle_update_messages($update, ['date' => $updates['date']]);
|
||||
break;
|
||||
case 'updateShort':
|
||||
|
@ -13,7 +13,7 @@ If not, see <http://www.gnu.org/licenses/>.
|
||||
namespace danog\MadelineProto\Wrappers;
|
||||
|
||||
/**
|
||||
* Manages logging in and out
|
||||
* Manages logging in and out.
|
||||
*/
|
||||
trait Login
|
||||
{
|
||||
@ -96,5 +96,4 @@ trait Login
|
||||
|
||||
return $this->API->datacenter->authorization;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user