mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-26 22:34:42 +01:00
Improve psalm
This commit is contained in:
parent
9c96a83c55
commit
d3f630e40f
2
docs
2
docs
@ -1 +1 @@
|
||||
Subproject commit 832a6d3cfe6e9790f00c0e65c7202e8e0fa6a553
|
||||
Subproject commit 035145fd21a2f8812f53b38e8a8c3636bb991a1b
|
@ -34,6 +34,7 @@
|
||||
<code>API</code>
|
||||
<code>API</code>
|
||||
<code>API</code>
|
||||
<code>API</code>
|
||||
</PropertyNotSetInConstructor>
|
||||
</file>
|
||||
<file src="src/APIWrapper.php">
|
||||
@ -221,8 +222,6 @@
|
||||
<code>$config</code>
|
||||
<code>$config</code>
|
||||
<code><![CDATA[$config->withDatabase(null)]]></code>
|
||||
<code><![CDATA[$settings->getIdleTimeout()]]></code>
|
||||
<code><![CDATA[$settings->getMaxConnections()]]></code>
|
||||
</ArgumentTypeCoercion>
|
||||
</file>
|
||||
<file src="src/Db/DriverArray.php">
|
||||
@ -823,6 +822,7 @@
|
||||
<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->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>
|
||||
@ -850,6 +850,7 @@
|
||||
<code>setWrapper</code>
|
||||
<code>setWrapper</code>
|
||||
<code>setWrapper</code>
|
||||
<code>setWrapper</code>
|
||||
</PossiblyUndefinedMethod>
|
||||
</file>
|
||||
<file src="src/Ipc/Client.php">
|
||||
@ -1486,7 +1487,6 @@
|
||||
</PossiblyInvalidArrayOffset>
|
||||
<PossiblyNullArgument>
|
||||
<code>$messageMedia</code>
|
||||
<code>$old_dc</code>
|
||||
</PossiblyNullArgument>
|
||||
<PossiblyNullReference>
|
||||
<code>decrypt</code>
|
||||
@ -1776,18 +1776,6 @@
|
||||
</PossiblyUndefinedArrayOffset>
|
||||
</file>
|
||||
<file src="src/MyTelegramOrgWrapper.php">
|
||||
<InvalidArgument>
|
||||
<code><![CDATA[$this->settings->getConnection()]]></code>
|
||||
<code><![CDATA[new class(new Logger($this->settings->getLogger())) implements LoggerGetter {
|
||||
public function __construct(private Logger $logger)
|
||||
{
|
||||
}
|
||||
public function getLogger(): Logger
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
}]]></code>
|
||||
</InvalidArgument>
|
||||
<MissingReturnType>
|
||||
<code>completeLogin</code>
|
||||
<code>createApp</code>
|
||||
@ -1800,21 +1788,6 @@
|
||||
<PossiblyUndefinedArrayOffset>
|
||||
<code>$value</code>
|
||||
</PossiblyUndefinedArrayOffset>
|
||||
<TooManyArguments>
|
||||
<code><![CDATA[new DoHWrapper(
|
||||
$this->settings->getConnection(),
|
||||
new class(new Logger($this->settings->getLogger())) implements LoggerGetter {
|
||||
public function __construct(private Logger $logger)
|
||||
{
|
||||
}
|
||||
public function getLogger(): Logger
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
},
|
||||
$this->jar
|
||||
)]]></code>
|
||||
</TooManyArguments>
|
||||
<UninitializedProperty>
|
||||
<code><![CDATA[$this->settings]]></code>
|
||||
</UninitializedProperty>
|
||||
@ -1827,6 +1800,58 @@
|
||||
<code>$wrapper</code>
|
||||
</PropertyNotSetInConstructor>
|
||||
</file>
|
||||
<file src="src/Ogg.php">
|
||||
<InaccessibleProperty>
|
||||
<code><![CDATA[$this->comments]]></code>
|
||||
<code><![CDATA[$this->vendorString]]></code>
|
||||
</InaccessibleProperty>
|
||||
<PossiblyInvalidArgument>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$size</code>
|
||||
</PossiblyInvalidArgument>
|
||||
<PossiblyInvalidPropertyAssignmentValue>
|
||||
<code><![CDATA[$this->currentDuration += $frameDuration]]></code>
|
||||
<code><![CDATA[$this->currentDuration += $totalDuration]]></code>
|
||||
</PossiblyInvalidPropertyAssignmentValue>
|
||||
<PossiblyNullArgument>
|
||||
<code><![CDATA[($this->stream)($headers['number_page_segments'])]]></code>
|
||||
<code><![CDATA[($this->stream)(23)]]></code>
|
||||
</PossiblyNullArgument>
|
||||
<PossiblyUndefinedVariable>
|
||||
<code>$cancel</code>
|
||||
</PossiblyUndefinedVariable>
|
||||
<PropertyNotSetInConstructor>
|
||||
<code>$comments</code>
|
||||
<code>$streamCount</code>
|
||||
<code>$vendorString</code>
|
||||
</PropertyNotSetInConstructor>
|
||||
<RedundantCondition>
|
||||
<code>$state === self::STATE_READ_COMMENT</code>
|
||||
</RedundantCondition>
|
||||
<ReferenceConstraintViolation>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
<code>$offset</code>
|
||||
</ReferenceConstraintViolation>
|
||||
<TooFewArguments>
|
||||
<code><![CDATA[($this->stream)($headers['number_page_segments'])]]></code>
|
||||
<code><![CDATA[($this->stream)($sizeAccumulated)]]></code>
|
||||
<code><![CDATA[($this->stream)(23)]]></code>
|
||||
<code><![CDATA[($this->stream)(4)]]></code>
|
||||
</TooFewArguments>
|
||||
<UndefinedClass>
|
||||
<code>?FFI</code>
|
||||
<code>FFI</code>
|
||||
<code>FFI</code>
|
||||
<code>int|CData $err</code>
|
||||
</UndefinedClass>
|
||||
</file>
|
||||
<file src="src/PTSException.php">
|
||||
<MissingParamType>
|
||||
<code>$file</code>
|
||||
|
@ -18,7 +18,6 @@
|
||||
<file name="src/DocsBuilder.php" />
|
||||
<file name="src/DocsBuilder/Methods.php" />
|
||||
<file name="src/DocsBuilder/Constructors.php" />
|
||||
<file name="src/Ogg.php" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
<issueHandlers>
|
||||
|
@ -20,6 +20,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace danog\MadelineProto;
|
||||
|
||||
/** @internal */
|
||||
interface LoggerGetter
|
||||
{
|
||||
public function getLogger(): Logger;
|
||||
|
Loading…
Reference in New Issue
Block a user