1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-26 21:14:43 +01:00
This commit is contained in:
Daniil Gentili 2023-09-01 16:10:17 +02:00
parent ec00340350
commit 4729f9427c
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 14 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="dev-master@d3463e30f3768de1f61d1ef4834b4bcd8aa179ef">
<files psalm-version="dev-master@96d83947615641734a5baa181d44da7f10ee0246">
<file src="src/API.php">
<ArgumentTypeCoercion>
<code>$settings</code>
@ -428,6 +428,14 @@
<code>$adminIds</code>
</MissingConstructor>
</file>
<file src="src/EventHandler/Filter/FilterFromBot.php">
<InaccessibleProperty>
<code><![CDATA[$this->API]]></code>
</InaccessibleProperty>
<MissingConstructor>
<code>$API</code>
</MissingConstructor>
</file>
<file src="src/EventHandler/Filter/FilterPeer.php">
<PropertyNotSetInConstructor>
<code>$peerResolved</code>
@ -1420,7 +1428,6 @@
</PossiblyNullArgument>
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$_SERVER['REQUEST_METHOD']]]></code>
<code><![CDATA[$_SERVER['REQUEST_METHOD']]]></code>
</PossiblyUndefinedArrayOffset>
<PossiblyUndefinedMethod>
<code>seek</code>
@ -1478,6 +1485,9 @@
</RedundantCastGivenDocblockType>
</file>
<file src="src/MTProtoTools/PeerHandler.php">
<InvalidArgument>
<code><![CDATA[self::isSupergroupOrChannel($peer) && $this->getInfo($peer, \danog\MadelineProto\API::INFO_TYPE_CONSTRUCTOR)['forum']]]></code>
</InvalidArgument>
<InvalidArrayOffset>
<code><![CDATA[$this->getInfo($peer, \danog\MadelineProto\API::INFO_TYPE_CONSTRUCTOR)['forum']]]></code>
</InvalidArrayOffset>

View File

@ -99,7 +99,7 @@ trait PeerHandler
*/
public function isForum(mixed $peer): bool
{
return self::isSupergroupOrChannel($peer) && $this->getInfo($peer, \danog\MadelineProto\API::INFO_TYPE_CONSTRUCTOR)['forum'] ?? false;
return $this->getInfo($peer, \danog\MadelineProto\API::INFO_TYPE_CONSTRUCTOR)['forum'] ?? false;
}
/**
@ -108,7 +108,7 @@ trait PeerHandler
*/
public function isBot(mixed $peer): bool
{
return $peer > 0 && $this->getType($peer) === API::PEER_TYPE_BOT;
return $this->getType($peer) === API::PEER_TYPE_BOT;
}
/**