mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 17:04:39 +01:00
Psalm fixes
This commit is contained in:
parent
b343265b32
commit
27e4c750b9
@ -28,3 +28,15 @@ steps:
|
||||
commands:
|
||||
- apk add bash
|
||||
- tests/test.sh cs
|
||||
|
||||
psalm:
|
||||
group: test
|
||||
image: danog/madelineproto:next
|
||||
when:
|
||||
event:
|
||||
- pull_request
|
||||
- tag
|
||||
- push
|
||||
commands:
|
||||
- apk add bash
|
||||
- tests/test.sh psalm
|
7246
psalm-baseline.xml
7246
psalm-baseline.xml
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="2"
|
||||
errorLevel="1"
|
||||
resolveFromConfigFile="true"
|
||||
findUnusedCode="false"
|
||||
findUnusedBaselineEntry="false"
|
||||
|
@ -57,7 +57,7 @@ final class ExitFailure
|
||||
$this->props = $props;
|
||||
}
|
||||
|
||||
public function getException(): object
|
||||
public function getException(): \Throwable
|
||||
{
|
||||
$prev = new MadelineProtoException("Client backtrace");
|
||||
|
||||
|
@ -1550,6 +1550,7 @@ If you intentionally deleted this account, ignore this message.',
|
||||
];
|
||||
|
||||
// THIS WILL BE OVERWRITTEN BY $lang["en"]
|
||||
/** @var array<string, string> */
|
||||
public static array $current_lang = [
|
||||
'2fa_uncalled' => 'I\'m not waiting for the password! Please call the phoneLogin and the completePhoneLogin methods first!',
|
||||
'accepting_call' => 'Accepting call from %s...',
|
||||
|
@ -22,7 +22,7 @@ namespace danog\MadelineProto\Loop\Connection;
|
||||
|
||||
use Amp\ByteStream\PendingReadError;
|
||||
use Amp\ByteStream\StreamException;
|
||||
use Amp\Websocket\ClosedException;
|
||||
use Amp\Websocket\WebsocketClosedException;
|
||||
use danog\Loop\Loop;
|
||||
use danog\MadelineProto\Logger;
|
||||
use danog\MadelineProto\MTProto\MTProtoIncomingMessage;
|
||||
@ -130,7 +130,7 @@ final class ReadLoop extends Loop
|
||||
}
|
||||
try {
|
||||
$buffer = $this->connection->stream->getReadBuffer($payload_length);
|
||||
} catch (ClosedException $e) {
|
||||
} catch (WebsocketClosedException $e) {
|
||||
$this->API->logger($e->getReason());
|
||||
if (str_starts_with($e->getReason(), ' ')) {
|
||||
$payload = -((int) substr($e->getReason(), 7));
|
||||
|
@ -543,6 +543,7 @@ final class Ogg
|
||||
}
|
||||
}
|
||||
}
|
||||
\assert(isset($opus));
|
||||
$checkErr = static function (int|CData $err) use ($opus): void {
|
||||
if ($err instanceof CData) {
|
||||
$err = $err->cdata;
|
||||
|
@ -34,6 +34,7 @@ final class Lang
|
||||
public static array $lang = %s;
|
||||
|
||||
// THIS WILL BE OVERWRITTEN BY $lang["en"]
|
||||
/** @var array<string, string> */
|
||||
public static array $current_lang = %s;
|
||||
}';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user