mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 08:18:59 +01:00
Fixes
This commit is contained in:
parent
b9513ac4a6
commit
2a80498542
@ -611,9 +611,6 @@
|
|||||||
<UnresolvableInclude>
|
<UnresolvableInclude>
|
||||||
<code><![CDATA[require $file]]></code>
|
<code><![CDATA[require $file]]></code>
|
||||||
</UnresolvableInclude>
|
</UnresolvableInclude>
|
||||||
<UnsafeInstantiation>
|
|
||||||
<code><![CDATA[new $class]]></code>
|
|
||||||
</UnsafeInstantiation>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/EventHandler/AbstractMessage.php">
|
<file src="src/EventHandler/AbstractMessage.php">
|
||||||
<InvalidReturnStatement>
|
<InvalidReturnStatement>
|
||||||
@ -2231,77 +2228,6 @@
|
|||||||
<code><![CDATA[$id]]></code>
|
<code><![CDATA[$id]]></code>
|
||||||
</TypeDoesNotContainType>
|
</TypeDoesNotContainType>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/InternalDoc.php">
|
|
||||||
<InvalidReturnStatement>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->getEventHandler($class)]]></code>
|
|
||||||
</InvalidReturnStatement>
|
|
||||||
<InvalidReturnType>
|
|
||||||
<code><![CDATA[T|EventHandlerProxy|__PHP_Incomplete_Class|null]]></code>
|
|
||||||
</InvalidReturnType>
|
|
||||||
<MissingParamType>
|
|
||||||
<code><![CDATA[$data]]></code>
|
|
||||||
</MissingParamType>
|
|
||||||
<MixedReturnStatement>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->downloadToDir($messageMedia, $dir, $cb, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->downloadToDir($messageMedia, $dir, $cb, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->downloadToFile($messageMedia, $file, $cb, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->downloadToFile($messageMedia, $file, $cb, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromCallable($callable, $size, $mime, $fileName, $cb, $seekable, $encrypted, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromCallable($callable, $size, $mime, $fileName, $cb, $seekable, $encrypted, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromTgfile($media, $cb, $encrypted, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromTgfile($media, $cb, $encrypted, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromUrl($url, $size, $fileName, $cb, $encrypted, $cancellation)]]></code>
|
|
||||||
<code><![CDATA[$this->wrapper->getAPI()->uploadFromUrl($url, $size, $fileName, $cb, $encrypted, $cancellation)]]></code>
|
|
||||||
</MixedReturnStatement>
|
|
||||||
<PossiblyInvalidPropertyAssignmentValue>
|
|
||||||
<code><![CDATA[$this->account ??= new \danog\MadelineProto\Namespace\AbstractAPI('account')]]></code>
|
|
||||||
<code><![CDATA[$this->auth ??= new \danog\MadelineProto\Namespace\AbstractAPI('auth')]]></code>
|
|
||||||
<code><![CDATA[$this->bots ??= new \danog\MadelineProto\Namespace\AbstractAPI('bots')]]></code>
|
|
||||||
<code><![CDATA[$this->channels ??= new \danog\MadelineProto\Namespace\AbstractAPI('channels')]]></code>
|
|
||||||
<code><![CDATA[$this->chatlists ??= new \danog\MadelineProto\Namespace\AbstractAPI('chatlists')]]></code>
|
|
||||||
<code><![CDATA[$this->contacts ??= new \danog\MadelineProto\Namespace\AbstractAPI('contacts')]]></code>
|
|
||||||
<code><![CDATA[$this->folders ??= new \danog\MadelineProto\Namespace\AbstractAPI('folders')]]></code>
|
|
||||||
<code><![CDATA[$this->fragment ??= new \danog\MadelineProto\Namespace\AbstractAPI('fragment')]]></code>
|
|
||||||
<code><![CDATA[$this->help ??= new \danog\MadelineProto\Namespace\AbstractAPI('help')]]></code>
|
|
||||||
<code><![CDATA[$this->langpack ??= new \danog\MadelineProto\Namespace\AbstractAPI('langpack')]]></code>
|
|
||||||
<code><![CDATA[$this->messages ??= new \danog\MadelineProto\Namespace\AbstractAPI('messages')]]></code>
|
|
||||||
<code><![CDATA[$this->payments ??= new \danog\MadelineProto\Namespace\AbstractAPI('payments')]]></code>
|
|
||||||
<code><![CDATA[$this->phone ??= new \danog\MadelineProto\Namespace\AbstractAPI('phone')]]></code>
|
|
||||||
<code><![CDATA[$this->photos ??= new \danog\MadelineProto\Namespace\AbstractAPI('photos')]]></code>
|
|
||||||
<code><![CDATA[$this->premium ??= new \danog\MadelineProto\Namespace\AbstractAPI('premium')]]></code>
|
|
||||||
<code><![CDATA[$this->smsjobs ??= new \danog\MadelineProto\Namespace\AbstractAPI('smsjobs')]]></code>
|
|
||||||
<code><![CDATA[$this->stats ??= new \danog\MadelineProto\Namespace\AbstractAPI('stats')]]></code>
|
|
||||||
<code><![CDATA[$this->stickers ??= new \danog\MadelineProto\Namespace\AbstractAPI('stickers')]]></code>
|
|
||||||
<code><![CDATA[$this->stories ??= new \danog\MadelineProto\Namespace\AbstractAPI('stories')]]></code>
|
|
||||||
<code><![CDATA[$this->updates ??= new \danog\MadelineProto\Namespace\AbstractAPI('updates')]]></code>
|
|
||||||
<code><![CDATA[$this->upload ??= new \danog\MadelineProto\Namespace\AbstractAPI('upload')]]></code>
|
|
||||||
<code><![CDATA[$this->users ??= new \danog\MadelineProto\Namespace\AbstractAPI('users')]]></code>
|
|
||||||
</PossiblyInvalidPropertyAssignmentValue>
|
|
||||||
<PossiblyUndefinedMethod>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
<code><![CDATA[setWrapper]]></code>
|
|
||||||
</PossiblyUndefinedMethod>
|
|
||||||
</file>
|
|
||||||
<file src="src/Ipc/Client.php">
|
<file src="src/Ipc/Client.php">
|
||||||
<ArgumentTypeCoercion>
|
<ArgumentTypeCoercion>
|
||||||
<code><![CDATA[$class]]></code>
|
<code><![CDATA[$class]]></code>
|
||||||
@ -4112,18 +4038,47 @@
|
|||||||
</file>
|
</file>
|
||||||
<file src="src/MTProtoTools/FilesAbstraction.php">
|
<file src="src/MTProtoTools/FilesAbstraction.php">
|
||||||
<MixedArgument>
|
<MixedArgument>
|
||||||
|
<code><![CDATA[$attributesOrig['thumbSeek']]]></code>
|
||||||
|
<code><![CDATA[$attributesOrig['thumbSeek']]]></code>
|
||||||
<code><![CDATA[$this->methodCallAsyncRead(
|
<code><![CDATA[$this->methodCallAsyncRead(
|
||||||
$method,
|
$method,
|
||||||
$params
|
$params
|
||||||
)]]></code>
|
)]]></code>
|
||||||
</MixedArgument>
|
</MixedArgument>
|
||||||
|
<MixedArrayAccess>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['h']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['h']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['no_sound']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['performer']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['title']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['w']]]></code>
|
||||||
|
</MixedArrayAccess>
|
||||||
|
<MixedArrayAssignment>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['h']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['performer']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['title']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['w']]]></code>
|
||||||
|
</MixedArrayAssignment>
|
||||||
<MixedAssignment>
|
<MixedAssignment>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['duration']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['h']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['performer']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['title']]]></code>
|
||||||
|
<code><![CDATA[$attributes[0]['w']]]></code>
|
||||||
<code><![CDATA[$message['media']['iv']]]></code>
|
<code><![CDATA[$message['media']['iv']]]></code>
|
||||||
<code><![CDATA[$message['media']['iv']]]></code>
|
<code><![CDATA[$message['media']['iv']]]></code>
|
||||||
<code><![CDATA[$message['media']['key']]]></code>
|
<code><![CDATA[$message['media']['key']]]></code>
|
||||||
<code><![CDATA[$message['media']['key']]]></code>
|
<code><![CDATA[$message['media']['key']]]></code>
|
||||||
<code><![CDATA[$message['media']['size']]]></code>
|
<code><![CDATA[$message['media']['size']]]></code>
|
||||||
<code><![CDATA[$message['media']['size']]]></code>
|
<code><![CDATA[$message['media']['size']]]></code>
|
||||||
|
<code><![CDATA[$thumb]]></code>
|
||||||
|
<code><![CDATA[$thumb]]></code>
|
||||||
</MixedAssignment>
|
</MixedAssignment>
|
||||||
<MoreSpecificReturnType>
|
<MoreSpecificReturnType>
|
||||||
<code><![CDATA[Message]]></code>
|
<code><![CDATA[Message]]></code>
|
||||||
@ -4134,6 +4089,19 @@
|
|||||||
<code><![CDATA[$media['file']]]></code>
|
<code><![CDATA[$media['file']]]></code>
|
||||||
<code><![CDATA[$media['file']]]></code>
|
<code><![CDATA[$media['file']]]></code>
|
||||||
</PossiblyInvalidArgument>
|
</PossiblyInvalidArgument>
|
||||||
|
<PossiblyNullArgument>
|
||||||
|
<code><![CDATA[$stderr]]></code>
|
||||||
|
<code><![CDATA[$stderr]]></code>
|
||||||
|
<code><![CDATA[$stderr]]></code>
|
||||||
|
<code><![CDATA[$stderr]]></code>
|
||||||
|
</PossiblyNullArgument>
|
||||||
|
<RedundantConditionGivenDocblockType>
|
||||||
|
<code><![CDATA[\is_array($media['file'])]]></code>
|
||||||
|
</RedundantConditionGivenDocblockType>
|
||||||
|
<ReferenceConstraintViolation>
|
||||||
|
<code><![CDATA[$file]]></code>
|
||||||
|
<code><![CDATA[$file]]></code>
|
||||||
|
</ReferenceConstraintViolation>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/MTProtoTools/FilesLogic.php">
|
<file src="src/MTProtoTools/FilesLogic.php">
|
||||||
<MissingClosureReturnType>
|
<MissingClosureReturnType>
|
||||||
@ -4180,13 +4148,9 @@
|
|||||||
<code><![CDATA[$file]]></code>
|
<code><![CDATA[$file]]></code>
|
||||||
</PossiblyInvalidArgument>
|
</PossiblyInvalidArgument>
|
||||||
<PossiblyNullArgument>
|
<PossiblyNullArgument>
|
||||||
<code><![CDATA[$_SERVER['REQUEST_METHOD']]]></code>
|
|
||||||
<code><![CDATA[$body]]></code>
|
<code><![CDATA[$body]]></code>
|
||||||
<code><![CDATA[$size]]></code>
|
<code><![CDATA[$size]]></code>
|
||||||
</PossiblyNullArgument>
|
</PossiblyNullArgument>
|
||||||
<PossiblyUndefinedArrayOffset>
|
|
||||||
<code><![CDATA[$_SERVER['REQUEST_METHOD']]]></code>
|
|
||||||
</PossiblyUndefinedArrayOffset>
|
|
||||||
<PossiblyUndefinedMethod>
|
<PossiblyUndefinedMethod>
|
||||||
<code><![CDATA[seek]]></code>
|
<code><![CDATA[seek]]></code>
|
||||||
<code><![CDATA[seek]]></code>
|
<code><![CDATA[seek]]></code>
|
||||||
@ -5147,6 +5111,14 @@
|
|||||||
<RedundantConditionGivenDocblockType>
|
<RedundantConditionGivenDocblockType>
|
||||||
<code><![CDATA[$timeout !== null]]></code>
|
<code><![CDATA[$timeout !== null]]></code>
|
||||||
</RedundantConditionGivenDocblockType>
|
</RedundantConditionGivenDocblockType>
|
||||||
|
<TypeDoesNotContainType>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
<code><![CDATA[$update['_'] === 'updateNewScheduledMessage']]></code>
|
||||||
|
</TypeDoesNotContainType>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/MTProtoTools/UpdatesState.php">
|
<file src="src/MTProtoTools/UpdatesState.php">
|
||||||
<MixedOperand>
|
<MixedOperand>
|
||||||
@ -6433,6 +6405,14 @@
|
|||||||
<code><![CDATA[ClosedException]]></code>
|
<code><![CDATA[ClosedException]]></code>
|
||||||
</UndefinedClass>
|
</UndefinedClass>
|
||||||
</file>
|
</file>
|
||||||
|
<file src="src/StreamDuplicator.php">
|
||||||
|
<MissingTemplateParam>
|
||||||
|
<code><![CDATA[IteratorAggregate]]></code>
|
||||||
|
</MissingTemplateParam>
|
||||||
|
<PropertyTypeCoercion>
|
||||||
|
<code><![CDATA[$outputs]]></code>
|
||||||
|
</PropertyTypeCoercion>
|
||||||
|
</file>
|
||||||
<file src="src/TL/Conversion/BotAPI.php">
|
<file src="src/TL/Conversion/BotAPI.php">
|
||||||
<MissingParamType>
|
<MissingParamType>
|
||||||
<code><![CDATA[$markup]]></code>
|
<code><![CDATA[$markup]]></code>
|
||||||
@ -7909,9 +7889,6 @@
|
|||||||
<code><![CDATA[$this->pluginInstances[$class]]]></code>
|
<code><![CDATA[$this->pluginInstances[$class]]]></code>
|
||||||
<code><![CDATA[$this->pluginInstances[$class]]]></code>
|
<code><![CDATA[$this->pluginInstances[$class]]]></code>
|
||||||
</PossiblyInvalidArrayOffset>
|
</PossiblyInvalidArrayOffset>
|
||||||
<UnsafeInstantiation>
|
|
||||||
<code><![CDATA[new $class_name]]></code>
|
|
||||||
</UnsafeInstantiation>
|
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Wrappers/Login.php">
|
<file src="src/Wrappers/Login.php">
|
||||||
<InvalidFalsableReturnType>
|
<InvalidFalsableReturnType>
|
||||||
|
@ -2120,7 +2120,7 @@ abstract class InternalDoc
|
|||||||
/**
|
/**
|
||||||
* Upload file.
|
* Upload file.
|
||||||
*
|
*
|
||||||
* @param FileCallbackInterface|LocalFile|RemoteUrl|BotApiFileId|string|array|resource $file File, URL or Telegram file to upload
|
* @param FileCallbackInterface|LocalFile|RemoteUrl|BotApiFileId|ReadableStream|string|array|resource $file File, URL or Telegram file to upload
|
||||||
* @param string $fileName File name
|
* @param string $fileName File name
|
||||||
* @param callable $cb Callback
|
* @param callable $cb Callback
|
||||||
* @param boolean $encrypted Whether to encrypt file for secret chats
|
* @param boolean $encrypted Whether to encrypt file for secret chats
|
||||||
|
@ -1047,10 +1047,10 @@ trait FilesAbstraction
|
|||||||
}
|
}
|
||||||
$p->getSink()->close();
|
$p->getSink()->close();
|
||||||
$p->getSource()->close();
|
$p->getSource()->close();
|
||||||
unset($p);
|
|
||||||
|
|
||||||
$mimeType ??= (new finfo())->buffer($buff, FILEINFO_MIME_TYPE);
|
$mimeType ??= (new finfo())->buffer($buff, FILEINFO_MIME_TYPE);
|
||||||
});
|
});
|
||||||
|
unset($p);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileFuture = async(fn () => $this->upload(new StreamDuplicator($file, ...$streams), $fileName ?? '', $callback, cancellation: $cancellation));
|
$fileFuture = async(fn () => $this->upload(new StreamDuplicator($file, ...$streams), $fileName ?? '', $callback, cancellation: $cancellation));
|
||||||
@ -1116,10 +1116,10 @@ trait FilesAbstraction
|
|||||||
}
|
}
|
||||||
$p->getSink()->close();
|
$p->getSink()->close();
|
||||||
$p->getSource()->close();
|
$p->getSource()->close();
|
||||||
unset($p);
|
|
||||||
|
|
||||||
$mimeType ??= (new finfo())->buffer($buff, FILEINFO_MIME_TYPE);
|
$mimeType ??= (new finfo())->buffer($buff, FILEINFO_MIME_TYPE);
|
||||||
});
|
});
|
||||||
|
unset($p);
|
||||||
}
|
}
|
||||||
|
|
||||||
$fileFuture = async(fn () => $this->upload(new StreamDuplicator($file, ...$streams), $fileName ?? '', $callback, cancellation: $cancellation));
|
$fileFuture = async(fn () => $this->upload(new StreamDuplicator($file, ...$streams), $fileName ?? '', $callback, cancellation: $cancellation));
|
||||||
|
@ -302,7 +302,7 @@ trait FilesLogic
|
|||||||
/**
|
/**
|
||||||
* Upload file.
|
* Upload file.
|
||||||
*
|
*
|
||||||
* @param FileCallbackInterface|LocalFile|RemoteUrl|BotApiFileId|string|array|resource $file File, URL or Telegram file to upload
|
* @param FileCallbackInterface|LocalFile|RemoteUrl|BotApiFileId|ReadableStream|string|array|resource $file File, URL or Telegram file to upload
|
||||||
* @param string $fileName File name
|
* @param string $fileName File name
|
||||||
* @param callable $cb Callback
|
* @param callable $cb Callback
|
||||||
* @param boolean $encrypted Whether to encrypt file for secret chats
|
* @param boolean $encrypted Whether to encrypt file for secret chats
|
||||||
|
Loading…
Reference in New Issue
Block a user