From 91f43c5442569ea169ac9e88d6777d4f8edfa3dd Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 9 Jul 2017 22:09:10 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/danog/MadelineProto/Logger.php | 1 - src/danog/MadelineProto/VoIP/AuthKeyHandler.php | 7 +++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/danog/MadelineProto/Logger.php b/src/danog/MadelineProto/Logger.php index e7b54d75..05477d6a 100644 --- a/src/danog/MadelineProto/Logger.php +++ b/src/danog/MadelineProto/Logger.php @@ -108,7 +108,6 @@ class Logger try { \Threaded::extend('\danog\MadelineProto\VoIP'); } catch (\RuntimeException $e) { - } } self::$colors[self::ULTRA_VERBOSE] = implode(';', [self::foreground['light_gray'], self::set['dim']]); diff --git a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php index df75cfe7..8da5935b 100644 --- a/src/danog/MadelineProto/VoIP/AuthKeyHandler.php +++ b/src/danog/MadelineProto/VoIP/AuthKeyHandler.php @@ -97,8 +97,8 @@ trait AuthKeyHandler while ($this->calls[$params['id']]['controller']->getState() !== \danog\MadelineProto\VoIP::STATE_ESTABLISHED); while ($this->calls[$params['id']]['controller']->getOutputState() !== \danog\MadelineProto\VoIP::AUDIO_STATE_RUNNING); - $writePeriod = $this->calls[$params['id']]['controller']->getInputParams()["writePeriod"]; - $samplesSize = $this->calls[$params['id']]['controller']->getInputParams()["samplesSize"]; + $writePeriod = $this->calls[$params['id']]['controller']->getInputParams()['writePeriod']; + $samplesSize = $this->calls[$params['id']]['controller']->getInputParams()['samplesSize']; var_dump('SENDING DAT'); $f = fopen('output.raw', 'r'); @@ -107,12 +107,11 @@ trait AuthKeyHandler usleep((int) ($writePeriod - (microtime(true) - $time) // Time it took me to write frames - ) + ) ); $time = microtime(true); $this->calls[$params['id']]['controller']->writeSamples(stream_get_contents($f, $samplesSize)); } - $this->handle_pending_updates(); }