1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 04:14:57 +01:00

Update baseline

This commit is contained in:
Daniil Gentili 2023-10-01 20:13:58 +02:00
parent 27d21681e7
commit e7d43be117

View File

@ -244,7 +244,7 @@
</MissingClosureParamType> </MissingClosureParamType>
<MissingClosureReturnType> <MissingClosureReturnType>
<code><![CDATA[fn ($v) => $v]]></code> <code><![CDATA[fn ($v) => $v]]></code>
<code><![CDATA[fn ($value) => \json_decode($value, true, 256, JSON_THROW_ON_ERROR)]]></code> <code><![CDATA[fn ($value) => json_decode($value, true, 256, JSON_THROW_ON_ERROR)]]></code>
</MissingClosureReturnType> </MissingClosureReturnType>
<MissingConstructor> <MissingConstructor>
<code>$dbSettings</code> <code>$dbSettings</code>
@ -310,9 +310,9 @@
<code>$value</code> <code>$value</code>
</MissingClosureParamType> </MissingClosureParamType>
<MissingClosureReturnType> <MissingClosureReturnType>
<code><![CDATA[fn ($v) => \igbinary_unserialize(\hex2bin($v))]]></code> <code><![CDATA[fn ($v) => igbinary_unserialize(hex2bin($v))]]></code>
<code><![CDATA[fn ($v) => \unserialize(\hex2bin($v))]]></code> <code><![CDATA[fn ($v) => unserialize(hex2bin($v))]]></code>
<code><![CDATA[fn ($value) => \json_decode(\hex2bin($value), true, 256, JSON_THROW_ON_ERROR)]]></code> <code><![CDATA[fn ($value) => json_decode(hex2bin($value), true, 256, JSON_THROW_ON_ERROR)]]></code>
</MissingClosureReturnType> </MissingClosureReturnType>
</file> </file>
<file src="src/Db/PostgresArrayBytea.php"> <file src="src/Db/PostgresArrayBytea.php">
@ -329,7 +329,7 @@
</MissingClosureParamType> </MissingClosureParamType>
<MissingClosureReturnType> <MissingClosureReturnType>
<code><![CDATA[fn ($v) => $v]]></code> <code><![CDATA[fn ($v) => $v]]></code>
<code><![CDATA[fn ($value) => \json_decode($value, true, 256, JSON_THROW_ON_ERROR)]]></code> <code><![CDATA[fn ($value) => json_decode($value, true, 256, JSON_THROW_ON_ERROR)]]></code>
</MissingClosureReturnType> </MissingClosureReturnType>
</file> </file>
<file src="src/Db/RedisArray.php"> <file src="src/Db/RedisArray.php">
@ -391,7 +391,7 @@
<code>self::$pluginCache</code> <code>self::$pluginCache</code>
</PropertyTypeCoercion> </PropertyTypeCoercion>
<RedundantFunctionCall> <RedundantFunctionCall>
<code>\array_values</code> <code>array_values</code>
</RedundantFunctionCall> </RedundantFunctionCall>
<TypeDoesNotContainType> <TypeDoesNotContainType>
<code><![CDATA[$this->startedInternal]]></code> <code><![CDATA[$this->startedInternal]]></code>
@ -412,7 +412,7 @@
<LessSpecificReturnStatement> <LessSpecificReturnStatement>
<code><![CDATA[$client->wrapMessage($client->extractMessage($result))]]></code> <code><![CDATA[$client->wrapMessage($client->extractMessage($result))]]></code>
<code><![CDATA[$client->wrapMessage($client->extractMessage($result))]]></code> <code><![CDATA[$client->wrapMessage($client->extractMessage($result))]]></code>
<code><![CDATA[\array_map( <code><![CDATA[array_map(
fn (array $arr): AbstractStory => fn (array $arr): AbstractStory =>
$arr['_'] === 'storyItemDeleted' $arr['_'] === 'storyItemDeleted'
? new StoryDeleted($client, ['peer' => $this->senderId, 'story' => $arr]) ? new StoryDeleted($client, ['peer' => $this->senderId, 'story' => $arr])
@ -504,9 +504,6 @@
<code><![CDATA[$this->botApiFileUniqueId]]></code> <code><![CDATA[$this->botApiFileUniqueId]]></code>
</PossiblyNullArrayAccess> </PossiblyNullArrayAccess>
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>$thumb</code>
<code>$thumbHeight</code>
<code>$thumbWidth</code>
<code>$thumbs</code> <code>$thumbs</code>
<code>$videoThumbs</code> <code>$videoThumbs</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
@ -515,90 +512,60 @@
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>AbstractAudio</code> <code>AbstractAudio</code>
<code>AbstractAudio</code> <code>AbstractAudio</code>
<code>AbstractAudio</code>
<code>AbstractAudio</code>
<code>AbstractAudio</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/AbstractSticker.php"> <file src="src/EventHandler/Media/AbstractSticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>AbstractSticker</code> <code>AbstractSticker</code>
<code>AbstractSticker</code> <code>AbstractSticker</code>
<code>AbstractSticker</code>
<code>AbstractSticker</code>
<code>AbstractSticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/AbstractVideo.php"> <file src="src/EventHandler/Media/AbstractVideo.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>AbstractVideo</code> <code>AbstractVideo</code>
<code>AbstractVideo</code> <code>AbstractVideo</code>
<code>AbstractVideo</code>
<code>AbstractVideo</code>
<code>AbstractVideo</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/AnimatedSticker.php"> <file src="src/EventHandler/Media/AnimatedSticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>AnimatedSticker</code> <code>AnimatedSticker</code>
<code>AnimatedSticker</code> <code>AnimatedSticker</code>
<code>AnimatedSticker</code>
<code>AnimatedSticker</code>
<code>AnimatedSticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Audio.php"> <file src="src/EventHandler/Media/Audio.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Audio</code> <code>Audio</code>
<code>Audio</code> <code>Audio</code>
<code>Audio</code>
<code>Audio</code>
<code>Audio</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/CustomEmoji.php"> <file src="src/EventHandler/Media/CustomEmoji.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>CustomEmoji</code> <code>CustomEmoji</code>
<code>CustomEmoji</code> <code>CustomEmoji</code>
<code>CustomEmoji</code>
<code>CustomEmoji</code>
<code>CustomEmoji</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Document.php"> <file src="src/EventHandler/Media/Document.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Document</code> <code>Document</code>
<code>Document</code> <code>Document</code>
<code>Document</code>
<code>Document</code>
<code>Document</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/DocumentPhoto.php"> <file src="src/EventHandler/Media/DocumentPhoto.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>DocumentPhoto</code> <code>DocumentPhoto</code>
<code>DocumentPhoto</code> <code>DocumentPhoto</code>
<code>DocumentPhoto</code>
<code>DocumentPhoto</code>
<code>DocumentPhoto</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Gif.php"> <file src="src/EventHandler/Media/Gif.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Gif</code> <code>Gif</code>
<code>Gif</code> <code>Gif</code>
<code>Gif</code>
<code>Gif</code>
<code>Gif</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/MaskSticker.php"> <file src="src/EventHandler/Media/MaskSticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>MaskSticker</code> <code>MaskSticker</code>
<code>MaskSticker</code> <code>MaskSticker</code>
<code>MaskSticker</code>
<code>MaskSticker</code>
<code>MaskSticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/MediaStory.php"> <file src="src/EventHandler/Media/MediaStory.php">
@ -610,63 +577,42 @@
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Photo</code> <code>Photo</code>
<code>Photo</code> <code>Photo</code>
<code>Photo</code>
<code>Photo</code>
<code>Photo</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/RoundVideo.php"> <file src="src/EventHandler/Media/RoundVideo.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>RoundVideo</code> <code>RoundVideo</code>
<code>RoundVideo</code> <code>RoundVideo</code>
<code>RoundVideo</code>
<code>RoundVideo</code>
<code>RoundVideo</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/StaticSticker.php"> <file src="src/EventHandler/Media/StaticSticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>StaticSticker</code> <code>StaticSticker</code>
<code>StaticSticker</code> <code>StaticSticker</code>
<code>StaticSticker</code>
<code>StaticSticker</code>
<code>StaticSticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Sticker.php"> <file src="src/EventHandler/Media/Sticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Sticker</code> <code>Sticker</code>
<code>Sticker</code> <code>Sticker</code>
<code>Sticker</code>
<code>Sticker</code>
<code>Sticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Video.php"> <file src="src/EventHandler/Media/Video.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Video</code> <code>Video</code>
<code>Video</code> <code>Video</code>
<code>Video</code>
<code>Video</code>
<code>Video</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/VideoSticker.php"> <file src="src/EventHandler/Media/VideoSticker.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>VideoSticker</code> <code>VideoSticker</code>
<code>VideoSticker</code> <code>VideoSticker</code>
<code>VideoSticker</code>
<code>VideoSticker</code>
<code>VideoSticker</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Media/Voice.php"> <file src="src/EventHandler/Media/Voice.php">
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>Voice</code> <code>Voice</code>
<code>Voice</code> <code>Voice</code>
<code>Voice</code>
<code>Voice</code>
<code>Voice</code>
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
</file> </file>
<file src="src/EventHandler/Message.php"> <file src="src/EventHandler/Message.php">
@ -768,7 +714,7 @@
</file> </file>
<file src="src/EventHandler/Privacy.php"> <file src="src/EventHandler/Privacy.php">
<PropertyTypeCoercion> <PropertyTypeCoercion>
<code><![CDATA[\array_map(RuleDestination::fromRawRule(...), $rawPrivacy['rules'])]]></code> <code><![CDATA[array_map(RuleDestination::fromRawRule(...), $rawPrivacy['rules'])]]></code>
</PropertyTypeCoercion> </PropertyTypeCoercion>
</file> </file>
<file src="src/EventHandler/Query/ChatTrait.php"> <file src="src/EventHandler/Query/ChatTrait.php">
@ -806,7 +752,7 @@
</PropertyNotSetInConstructor> </PropertyNotSetInConstructor>
<PropertyTypeCoercion> <PropertyTypeCoercion>
<code><![CDATA[$API->wrapMedia($rawStory['media'], $this->protected)]]></code> <code><![CDATA[$API->wrapMedia($rawStory['media'], $this->protected)]]></code>
<code><![CDATA[\array_map(RuleDestination::fromRawRule(...), $rawStory['privacy'] ?? [])]]></code> <code><![CDATA[array_map(RuleDestination::fromRawRule(...), $rawStory['privacy'] ?? [])]]></code>
</PropertyTypeCoercion> </PropertyTypeCoercion>
</file> </file>
<file src="src/EventHandler/Story/StoryReaction.php"> <file src="src/EventHandler/Story/StoryReaction.php">
@ -821,7 +767,7 @@
</file> </file>
<file src="src/EventHandler/User/Username.php"> <file src="src/EventHandler/User/Username.php">
<PropertyTypeCoercion> <PropertyTypeCoercion>
<code><![CDATA[\array_map( <code><![CDATA[array_map(
fn (array $username) => new UsernameInfo($username), fn (array $username) => new UsernameInfo($username),
$rawUserName['usernames'] $rawUserName['usernames']
)]]></code> )]]></code>
@ -934,7 +880,7 @@
<code>logger</code> <code>logger</code>
</PossiblyNullReference> </PossiblyNullReference>
<PossiblyUndefinedArrayOffset> <PossiblyUndefinedArrayOffset>
<code><![CDATA[\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code> <code><![CDATA[debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code>
</PossiblyUndefinedArrayOffset> </PossiblyUndefinedArrayOffset>
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>$logger</code> <code>$logger</code>
@ -1071,8 +1017,8 @@
<code>$optional</code> <code>$optional</code>
</PossiblyInvalidOperand> </PossiblyInvalidOperand>
<PossiblyUndefinedArrayOffset> <PossiblyUndefinedArrayOffset>
<code><![CDATA[\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code> <code><![CDATA[debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code>
<code><![CDATA[\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code> <code><![CDATA[debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code>
</PossiblyUndefinedArrayOffset> </PossiblyUndefinedArrayOffset>
<PropertyNotSetInConstructor> <PropertyNotSetInConstructor>
<code>$colors</code> <code>$colors</code>
@ -1147,7 +1093,7 @@
</file> </file>
<file src="src/Loop/Connection/ReadLoop.php"> <file src="src/Loop/Connection/ReadLoop.php">
<DocblockTypeContradiction> <DocblockTypeContradiction>
<code><![CDATA[\str_starts_with($e->getReason(), ' ')]]></code> <code><![CDATA[str_starts_with($e->getReason(), ' ')]]></code>
</DocblockTypeContradiction> </DocblockTypeContradiction>
<InvalidThrow> <InvalidThrow>
<code>throw $e;</code> <code>throw $e;</code>
@ -1312,15 +1258,15 @@
<code>$callbacks</code> <code>$callbacks</code>
</InvalidArgument> </InvalidArgument>
<InvalidReturnStatement> <InvalidReturnStatement>
<code><![CDATA[\array_merge( <code><![CDATA[array_merge(
\array_fill_keys( array_fill_keys(
[ [
'InputUser', 'InputUser',
'InputChannel', 'InputChannel',
], ],
$this->getInputConstructor(...), $this->getInputConstructor(...),
), ),
\array_fill_keys( array_fill_keys(
[ [
'User', 'User',
'Chat', 'Chat',
@ -1330,7 +1276,7 @@
], ],
$this->getInfo(...), $this->getInfo(...),
), ),
\array_fill_keys( array_fill_keys(
[ [
'InputMedia', 'InputMedia',
'InputDocument', 'InputDocument',
@ -1385,7 +1331,7 @@
<code>start</code> <code>start</code>
</PossiblyNullReference> </PossiblyNullReference>
<PossiblyUndefinedArrayOffset> <PossiblyUndefinedArrayOffset>
<code><![CDATA[\debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code> <code><![CDATA[debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1)[0]['file']]]></code>
</PossiblyUndefinedArrayOffset> </PossiblyUndefinedArrayOffset>
<PropertyTypeCoercion> <PropertyTypeCoercion>
<code><![CDATA[$this->sanitizeReportPeers($userOrId)]]></code> <code><![CDATA[$this->sanitizeReportPeers($userOrId)]]></code>
@ -1467,7 +1413,7 @@
</MissingClosureReturnType> </MissingClosureReturnType>
<PossiblyInvalidArgument> <PossiblyInvalidArgument>
<code>$response</code> <code>$response</code>
<code>\time() + $seconds</code> <code>time() + $seconds</code>
</PossiblyInvalidArgument> </PossiblyInvalidArgument>
<PossiblyNullArgument> <PossiblyNullArgument>
<code>$msgId</code> <code>$msgId</code>
@ -1483,7 +1429,7 @@
<code><![CDATA[$this->API->authorized_dc == $this->datacenter && $this->API->authorized === \danog\MadelineProto\API::LOGGED_IN]]></code> <code><![CDATA[$this->API->authorized_dc == $this->datacenter && $this->API->authorized === \danog\MadelineProto\API::LOGGED_IN]]></code>
</RedundantConditionGivenDocblockType> </RedundantConditionGivenDocblockType>
<RiskyCast> <RiskyCast>
<code><![CDATA[\preg_replace('/[^0-9]+/', '', $response['error_message'])]]></code> <code><![CDATA[preg_replace('/[^0-9]+/', '', $response['error_message'])]]></code>
</RiskyCast> </RiskyCast>
</file> </file>
<file src="src/MTProtoSession/Session.php"> <file src="src/MTProtoSession/Session.php">
@ -1831,7 +1777,7 @@
</file> </file>
<file src="src/Magic.php"> <file src="src/Magic.php">
<PossiblyUndefinedArrayOffset> <PossiblyUndefinedArrayOffset>
<code><![CDATA[\end($backtrace)['file']]]></code> <code><![CDATA[end($backtrace)['file']]]></code>
</PossiblyUndefinedArrayOffset> </PossiblyUndefinedArrayOffset>
</file> </file>
<file src="src/MyTelegramOrgWrapper.php"> <file src="src/MyTelegramOrgWrapper.php">