Apply fixes from StyleCI

This commit is contained in:
Daniil Gentili 2018-03-27 13:42:18 +00:00 committed by StyleCI Bot
parent 622f37fb2d
commit dc0dcf76c6
2 changed files with 17 additions and 7 deletions

View File

@ -208,7 +208,7 @@ return false;
curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate'); curl_setopt($ch, CURLOPT_ENCODING, 'gzip, deflate');
$headers = []; $headers = [];
$headers[] = "Cookie: stel_token=".$this->token; $headers[] = 'Cookie: stel_token='.$this->token;
$headers[] = 'Origin: https://my.telegram.org'; $headers[] = 'Origin: https://my.telegram.org';
$headers[] = 'Accept-Encoding: gzip, deflate, br'; $headers[] = 'Accept-Encoding: gzip, deflate, br';
$headers[] = 'Accept-Language: it-IT,it;q=0.8,en-US;q=0.6,en;q=0.4'; $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[] = '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[] = 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8';
$headers[] = 'Referer: https://my.telegram.org/'; $headers[] = 'Referer: https://my.telegram.org/';
$headers[] = "Cookie: stel_token=".$this->token; $headers[] = 'Cookie: stel_token='.$this->token;
$headers[] = 'Connection: keep-alive'; $headers[] = 'Connection: keep-alive';
$headers[] = 'Cache-Control: max-age=0'; $headers[] = 'Cache-Control: max-age=0';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

View File

@ -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. You should have received a copy of the GNU General Public License along with MadelineProto.
If not, see <http://www.gnu.org/licenses/>. If not, see <http://www.gnu.org/licenses/>.
*/ */
namespace danog\MadelineProto; namespace danog\MadelineProto;
if (!extension_loaded('php-libtgvoip')) { if (!extension_loaded('php-libtgvoip')) {
@ -70,7 +71,8 @@ if (!extension_loaded('php-libtgvoip')) {
private $callID; private $callID;
private $visualization; private $visualization;
public function __construct($creator, $otherID, $callID, $MadelineProto, $callState, $protocol) { public function __construct($creator, $otherID, $callID, $MadelineProto, $callState, $protocol)
{
$this->creator = $creator; $this->creator = $creator;
$this->otherID = $otherID; $this->otherID = $otherID;
$this->callID = $callID; $this->callID = $callID;
@ -78,15 +80,23 @@ if (!extension_loaded('php-libtgvoip')) {
$this->callState = $callState; $this->callState = $callState;
$this->configuration['protocol'] = $protocol; $this->configuration['protocol'] = $protocol;
} }
public function setVisualization($visualization) {
public function setVisualization($visualization)
{
$this->visualization = $visualization; $this->visualization = $visualization;
} }
public function parseConfig() {
public function parseConfig()
{
} }
public function startTheMagic() {
public function startTheMagic()
{
var_dump($this->configuration); var_dump($this->configuration);
} }
public function getCallState() {
public function getCallState()
{
return $this->callState; return $this->callState;
} }
} }