diff --git a/build_docs.php b/build_docs.php index 47406916..e557b4fb 100755 --- a/build_docs.php +++ b/build_docs.php @@ -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'])) { diff --git a/src/danog/MadelineProto/API.php b/src/danog/MadelineProto/API.php index 9e432dca..17f3dd57 100644 --- a/src/danog/MadelineProto/API.php +++ b/src/danog/MadelineProto/API.php @@ -59,5 +59,4 @@ class API extends APIFactory $this->{$namespace} = new APIFactory($namespace, $this->API); } } - } diff --git a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php index a487d10e..e29f642c 100644 --- a/src/danog/MadelineProto/MTProtoTools/PeerHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/PeerHandler.php @@ -53,5 +53,4 @@ trait PeerHandler } } } - } diff --git a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php index d8002503..4d119012 100644 --- a/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/ResponseHandler.php @@ -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': diff --git a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php index 5f0faaf1..2bf9684b 100644 --- a/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php +++ b/src/danog/MadelineProto/MTProtoTools/UpdateHandler.php @@ -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': diff --git a/src/danog/MadelineProto/Wrappers/Login.php b/src/danog/MadelineProto/Wrappers/Login.php index aac08149..3a3dde00 100644 --- a/src/danog/MadelineProto/Wrappers/Login.php +++ b/src/danog/MadelineProto/Wrappers/Login.php @@ -13,7 +13,7 @@ If not, see . 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; } - }