Apply fixes from StyleCI
This commit is contained in:
parent
cd1040ec19
commit
3b6678aac4
7
a.php
7
a.php
@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
$payload = base64_decode('NAAAAAAAAAAAAAAAAAAAAAAAAAC06N5YFAAAAHiXRmAwx9DuB28gQszy/RHjhN2RdLkYdQ==');
|
||||
$socket = fsockopen('tcp://149.154.167.91:443'); // DC 4
|
||||
$socket = fsockopen('tcp://149.154.167.50:443'); // DC 2
|
||||
stream_set_timeout($socket, 5);
|
||||
echo 'Wrote '.fwrite($socket, $payload).' bytes'.PHP_EOL;
|
||||
if (strlen(fread($socket, 100))) echo 'Read 100 bytes from socket'.PHP_EOL; else echo 'No data could be read from socket'.PHP_EOL;
|
||||
if (strlen(fread($socket, 100))) {
|
||||
echo 'Read 100 bytes from socket'.PHP_EOL;
|
||||
} else {
|
||||
echo 'No data could be read from socket'.PHP_EOL;
|
||||
}
|
||||
|
@ -96,7 +96,9 @@ class API extends APIFactory
|
||||
{
|
||||
set_error_handler(['\danog\MadelineProto\Exception', 'ExceptionErrorHandler']);
|
||||
$this->setup_threads();
|
||||
if (!isset($this->messages)) $this->APIFactory();
|
||||
if (!isset($this->messages)) {
|
||||
$this->APIFactory();
|
||||
}
|
||||
}
|
||||
|
||||
public function __destruct()
|
||||
|
@ -703,7 +703,6 @@ description: Any json-encodable data
|
||||
|
||||
Any json-encodable data.');
|
||||
|
||||
|
||||
\danog\MadelineProto\Logger::log(['Done!'], \danog\MadelineProto\Logger::NOTICE);
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +103,6 @@ class MTProto
|
||||
$this->should_serialize = true;
|
||||
}
|
||||
|
||||
|
||||
public function __wakeup()
|
||||
{
|
||||
if (class_exists('\Thread') && method_exists('\Thread', 'getCurrentThread') && is_object(\Thread::getCurrentThread())) {
|
||||
|
@ -576,6 +576,7 @@ trait TL
|
||||
if ($x['_'] === 'dataJSON') {
|
||||
return json_decode($x['data'], true);
|
||||
}
|
||||
|
||||
return $x;
|
||||
}
|
||||
}
|
||||
|
@ -98,5 +98,4 @@ trait AuthKeyHandler
|
||||
{
|
||||
return $this->calls[$chat];
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user