From 5fd727292d62499af1ec30a47276fcbe7eeafc2b Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 30 Mar 2018 10:54:16 +0000 Subject: [PATCH] Apply fixes from StyleCI --- magna.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/magna.php b/magna.php index 6544300b..062f609e 100755 --- a/magna.php +++ b/magna.php @@ -229,19 +229,19 @@ Propic art by @magnaluna on [deviantart](https://magnaluna.deviantart.com).", 'p foreach ($this->times_messages as $key => $pair) { list($peer, $time, $message) = $pair; if ($time < time()) { - try { - $this->messages->sendMessage(['peer' => $peer, 'message' => $message ]); - } catch (\danog\MadelineProto\RPCErrorException $e) { - if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) { - $t = str_replace('FLOOD_WAIT_', '', $e->rpc); - $this->times_messages[] = [$peer, time() + 1 + $t, $message]; - } - echo $e; + try { + $this->messages->sendMessage(['peer' => $peer, 'message' => $message]); + } catch (\danog\MadelineProto\RPCErrorException $e) { + if (strpos($e->rpc, 'FLOOD_WAIT_') === 0) { + $t = str_replace('FLOOD_WAIT_', '', $e->rpc); + $this->times_messages[] = [$peer, time() + 1 + $t, $message]; } + echo $e; + } unset($this->times_messages[$key]); } } - \danog\MadelineProto\Logger::log(count($this->calls)." calls running!"); + \danog\MadelineProto\Logger::log(count($this->calls).' calls running!'); foreach ($this->calls as $key => $call) { if ($call->getCallState() === \danog\MadelineProto\VoIP::CALL_STATE_ENDED) { unset($this->calls[$key]);