1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 14:34:39 +01:00

Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2017-01-14 23:25:15 +00:00 committed by StyleCI Bot
parent 6711f6e814
commit cec3294a3a
2 changed files with 5 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class Logger
if (!is_string($param)) {
$param = var_export($param, true);
}
$param = str_pad(basename(debug_backtrace()[0]['file'], '.php').self::$prefix.': ', 16+strlen(self::$prefix))."\t".$param;
$param = str_pad(basename(debug_backtrace()[0]['file'], '.php').self::$prefix.': ', 16 + strlen(self::$prefix))."\t".$param;
switch (self::$mode) {
case 1:
error_log($param);

View File

@ -24,11 +24,13 @@ trait UpdateHandler
private $getting_state = false;
public $full_chats;
public function full_chat_last_updated($id) {
public function full_chat_last_updated($id)
{
$id = $this->get_info($id)['bot_api_id'];
return isset($this->full_chats[$id]['last_update']) ? $this->full_chats[$id]['last_update'] : 0;
}
public function pwr_update_handler($update)
{
if (isset($update['message']['to_id']) && time() - $this->full_chat_last_updated($update['message']['to_id']) <= 600) {