From dc0dcf76c619331a5e18ab4d7517c1245b31a83c Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Tue, 27 Mar 2018 13:42:18 +0000 Subject: [PATCH] Apply fixes from StyleCI --- .../MadelineProto/MyTelegramOrgWrapper.php | 4 ++-- src/danog/MadelineProto/VoIP.php | 20 ++++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/danog/MadelineProto/MyTelegramOrgWrapper.php b/src/danog/MadelineProto/MyTelegramOrgWrapper.php index 97322547..1902eda0 100644 --- a/src/danog/MadelineProto/MyTelegramOrgWrapper.php +++ b/src/danog/MadelineProto/MyTelegramOrgWrapper.php @@ -208,7 +208,7 @@ return false; curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate'); $headers = []; - $headers[] = "Cookie: stel_token=".$this->token; + $headers[] = 'Cookie: stel_token='.$this->token; $headers[] = 'Origin: https://my.telegram.org'; $headers[] = 'Accept-Encoding: gzip, deflate, br'; $headers[] = 'Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4'; @@ -243,7 +243,7 @@ return false; $headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36'; $headers[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8'; $headers[] = 'Referer: https://my.telegram.org/'; - $headers[] = "Cookie: stel_token=".$this->token; + $headers[] = 'Cookie: stel_token='.$this->token; $headers[] = 'Connection: keep-alive'; $headers[] = 'Cache-Control: max-age=0'; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); diff --git a/src/danog/MadelineProto/VoIP.php b/src/danog/MadelineProto/VoIP.php index c5efac6a..8ef1f9eb 100644 --- a/src/danog/MadelineProto/VoIP.php +++ b/src/danog/MadelineProto/VoIP.php @@ -9,6 +9,7 @@ See the GNU Affero General Public License for more details. You should have received a copy of the GNU General Public License along with MadelineProto. If not, see . */ + namespace danog\MadelineProto; if (!extension_loaded('php-libtgvoip')) { @@ -70,7 +71,8 @@ if (!extension_loaded('php-libtgvoip')) { private $callID; private $visualization; - public function __construct($creator, $otherID, $callID, $MadelineProto, $callState, $protocol) { + public function __construct($creator, $otherID, $callID, $MadelineProto, $callState, $protocol) + { $this->creator = $creator; $this->otherID = $otherID; $this->callID = $callID; @@ -78,15 +80,23 @@ if (!extension_loaded('php-libtgvoip')) { $this->callState = $callState; $this->configuration['protocol'] = $protocol; } - public function setVisualization($visualization) { + + public function setVisualization($visualization) + { $this->visualization = $visualization; } - public function parseConfig() { + + public function parseConfig() + { } - public function startTheMagic() { + + public function startTheMagic() + { var_dump($this->configuration); } - public function getCallState() { + + public function getCallState() + { return $this->callState; } }