mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 10:19:00 +01:00
Quickfix
This commit is contained in:
parent
0cb8d7f27e
commit
fc312b137d
@ -873,10 +873,10 @@ class DataCenter
|
||||
}
|
||||
|
||||
/**
|
||||
* Get contents of file
|
||||
* Get contents of file.
|
||||
*
|
||||
* @param string $url URL to fetch
|
||||
*
|
||||
*
|
||||
* @return \Generator<string>
|
||||
*/
|
||||
public function fileGetContents(string $url): \Generator
|
||||
|
@ -5092,11 +5092,11 @@ class InternalDoc extends APIFactory
|
||||
/**
|
||||
* Convert double to binary version.
|
||||
*
|
||||
* @param double $value Value to convert
|
||||
* @param float $value Value to convert
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function packDouble(\danog\MadelineProto\double $value, array $extra = []): string
|
||||
public function packDouble(float $value, array $extra = []): string
|
||||
{
|
||||
return $this->__call(__FUNCTION__, [$value, $extra]);
|
||||
}
|
||||
@ -5105,9 +5105,9 @@ class InternalDoc extends APIFactory
|
||||
*
|
||||
* @param string $value Value to unpack
|
||||
*
|
||||
* @return double
|
||||
* @return float
|
||||
*/
|
||||
public function unpackDouble(string $value, array $extra = []): danog\MadelineProto\double
|
||||
public function unpackDouble(string $value, array $extra = []): float
|
||||
{
|
||||
return $this->__call(__FUNCTION__, [$value, $extra]);
|
||||
}
|
||||
@ -5199,7 +5199,7 @@ class InternalDoc extends APIFactory
|
||||
* @param ?\Generator|Promise $actual Promise to resolve instead of $promise
|
||||
* @param string $file File
|
||||
*
|
||||
* @return void
|
||||
* @return Promise
|
||||
*/
|
||||
public function callFork($promise, $actual = null, $file = '', array $extra = [])
|
||||
{
|
||||
@ -5258,11 +5258,11 @@ class InternalDoc extends APIFactory
|
||||
*
|
||||
* @param string $file File to lock
|
||||
* @param integer $operation Locking mode
|
||||
* @param integer $polling Polling interval
|
||||
* @param float $polling Polling interval
|
||||
*
|
||||
* @return Promise
|
||||
*/
|
||||
public function flock(string $file, int $operation, $polling = 0.1, array $extra = [])
|
||||
public function flock(string $file, int $operation, float $polling = 0.1, array $extra = [])
|
||||
{
|
||||
return $this->__call(__FUNCTION__, [$file, $operation, $polling, $extra]);
|
||||
}
|
||||
@ -5271,11 +5271,11 @@ class InternalDoc extends APIFactory
|
||||
*
|
||||
* @param string $file File to lock
|
||||
* @param integer $operation Locking mode
|
||||
* @param integer $polling Polling interval
|
||||
* @param float $polling Polling interval
|
||||
*
|
||||
* @return void
|
||||
* @return \Generator
|
||||
*/
|
||||
public function flockGenerator(string $file, int $operation, $polling, array $extra = [])
|
||||
public function flockGenerator(string $file, int $operation, float $polling, array $extra = [])
|
||||
{
|
||||
return $this->__call(__FUNCTION__, [$file, $operation, $polling, $extra]);
|
||||
}
|
||||
@ -5306,7 +5306,7 @@ class InternalDoc extends APIFactory
|
||||
*
|
||||
* @param string $prompt Prompt
|
||||
*
|
||||
* @return void
|
||||
* @return \Generator
|
||||
*/
|
||||
public function readLineGenerator(string $prompt = '', array $extra = [])
|
||||
{
|
||||
@ -5330,7 +5330,7 @@ class InternalDoc extends APIFactory
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function isArrayOrAlike($var, array $extra = [])
|
||||
public function isArrayOrAlike($var, array $extra = []): bool
|
||||
{
|
||||
return $this->__call(__FUNCTION__, [$var, $extra]);
|
||||
}
|
||||
|
@ -174,7 +174,6 @@ class ReadLoop extends SignalLoop
|
||||
$auth_key_id = yield $buffer->bufferRead(8);
|
||||
|
||||
if ($auth_key_id === "\0\0\0\0\0\0\0\0") {
|
||||
|
||||
$message_id = yield $buffer->bufferRead(8);
|
||||
if (!\in_array($message_id, [1, 0])) {
|
||||
$connection->checkMessageId($message_id, ['outgoing' => false, 'container' => false]);
|
||||
|
@ -27,7 +27,6 @@ use danog\MadelineProto\MTProto;
|
||||
*/
|
||||
trait ResponseHandler
|
||||
{
|
||||
|
||||
public function sendMsgsStateInfo($req_msg_id, $msg_ids)
|
||||
{
|
||||
$this->logger->logger('Sending state info for '.\count($msg_ids).' message IDs');
|
||||
|
@ -269,11 +269,11 @@ class TL
|
||||
if ($scheme_type === 'secret') {
|
||||
$this->secretLayer = \max($this->secretLayer, $elem['layer']);
|
||||
}
|
||||
$this->{($scheme_type === 'td' ? 'td_' : '').'constructors'}->add($elem, $scheme_type);
|
||||
$this->{$scheme_type === 'td' ? 'tdConstructors' : 'constructors'}->add($elem, $scheme_type);
|
||||
}
|
||||
$this->API->logger->logger(\danog\MadelineProto\Lang::$current_lang['translating_methods'], \danog\MadelineProto\Logger::ULTRA_VERBOSE);
|
||||
foreach ($TL_dict['methods'] as $elem) {
|
||||
$this->{($scheme_type === 'td' ? 'td_' : '').'methods'}->add($elem);
|
||||
$this->{$scheme_type === 'td' ? 'tdMethods' : 'methods'}->add($elem);
|
||||
if ($scheme_type === 'secret') {
|
||||
$this->secretLayer = \max($this->secretLayer, $elem['layer']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user