mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 07:58:58 +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>
|
||||||
<code>API</code>
|
<code>API</code>
|
||||||
|
<code>API</code>
|
||||||
</PropertyNotSetInConstructor>
|
</PropertyNotSetInConstructor>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/APIWrapper.php">
|
<file src="src/APIWrapper.php">
|
||||||
@ -221,8 +222,6 @@
|
|||||||
<code>$config</code>
|
<code>$config</code>
|
||||||
<code>$config</code>
|
<code>$config</code>
|
||||||
<code><![CDATA[$config->withDatabase(null)]]></code>
|
<code><![CDATA[$config->withDatabase(null)]]></code>
|
||||||
<code><![CDATA[$settings->getIdleTimeout()]]></code>
|
|
||||||
<code><![CDATA[$settings->getMaxConnections()]]></code>
|
|
||||||
</ArgumentTypeCoercion>
|
</ArgumentTypeCoercion>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Db/DriverArray.php">
|
<file src="src/Db/DriverArray.php">
|
||||||
@ -823,6 +822,7 @@
|
|||||||
<code><![CDATA[$this->payments ??= new \danog\MadelineProto\Namespace\AbstractAPI('payments')]]></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->phone ??= new \danog\MadelineProto\Namespace\AbstractAPI('phone')]]></code>
|
||||||
<code><![CDATA[$this->photos ??= new \danog\MadelineProto\Namespace\AbstractAPI('photos')]]></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->stats ??= new \danog\MadelineProto\Namespace\AbstractAPI('stats')]]></code>
|
||||||
<code><![CDATA[$this->stickers ??= new \danog\MadelineProto\Namespace\AbstractAPI('stickers')]]></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->stories ??= new \danog\MadelineProto\Namespace\AbstractAPI('stories')]]></code>
|
||||||
@ -850,6 +850,7 @@
|
|||||||
<code>setWrapper</code>
|
<code>setWrapper</code>
|
||||||
<code>setWrapper</code>
|
<code>setWrapper</code>
|
||||||
<code>setWrapper</code>
|
<code>setWrapper</code>
|
||||||
|
<code>setWrapper</code>
|
||||||
</PossiblyUndefinedMethod>
|
</PossiblyUndefinedMethod>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/Ipc/Client.php">
|
<file src="src/Ipc/Client.php">
|
||||||
@ -1486,7 +1487,6 @@
|
|||||||
</PossiblyInvalidArrayOffset>
|
</PossiblyInvalidArrayOffset>
|
||||||
<PossiblyNullArgument>
|
<PossiblyNullArgument>
|
||||||
<code>$messageMedia</code>
|
<code>$messageMedia</code>
|
||||||
<code>$old_dc</code>
|
|
||||||
</PossiblyNullArgument>
|
</PossiblyNullArgument>
|
||||||
<PossiblyNullReference>
|
<PossiblyNullReference>
|
||||||
<code>decrypt</code>
|
<code>decrypt</code>
|
||||||
@ -1776,18 +1776,6 @@
|
|||||||
</PossiblyUndefinedArrayOffset>
|
</PossiblyUndefinedArrayOffset>
|
||||||
</file>
|
</file>
|
||||||
<file src="src/MyTelegramOrgWrapper.php">
|
<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>
|
<MissingReturnType>
|
||||||
<code>completeLogin</code>
|
<code>completeLogin</code>
|
||||||
<code>createApp</code>
|
<code>createApp</code>
|
||||||
@ -1800,21 +1788,6 @@
|
|||||||
<PossiblyUndefinedArrayOffset>
|
<PossiblyUndefinedArrayOffset>
|
||||||
<code>$value</code>
|
<code>$value</code>
|
||||||
</PossiblyUndefinedArrayOffset>
|
</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>
|
<UninitializedProperty>
|
||||||
<code><![CDATA[$this->settings]]></code>
|
<code><![CDATA[$this->settings]]></code>
|
||||||
</UninitializedProperty>
|
</UninitializedProperty>
|
||||||
@ -1827,6 +1800,58 @@
|
|||||||
<code>$wrapper</code>
|
<code>$wrapper</code>
|
||||||
</PropertyNotSetInConstructor>
|
</PropertyNotSetInConstructor>
|
||||||
</file>
|
</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">
|
<file src="src/PTSException.php">
|
||||||
<MissingParamType>
|
<MissingParamType>
|
||||||
<code>$file</code>
|
<code>$file</code>
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
<file name="src/DocsBuilder.php" />
|
<file name="src/DocsBuilder.php" />
|
||||||
<file name="src/DocsBuilder/Methods.php" />
|
<file name="src/DocsBuilder/Methods.php" />
|
||||||
<file name="src/DocsBuilder/Constructors.php" />
|
<file name="src/DocsBuilder/Constructors.php" />
|
||||||
<file name="src/Ogg.php" />
|
|
||||||
</ignoreFiles>
|
</ignoreFiles>
|
||||||
</projectFiles>
|
</projectFiles>
|
||||||
<issueHandlers>
|
<issueHandlers>
|
||||||
|
@ -20,6 +20,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace danog\MadelineProto;
|
namespace danog\MadelineProto;
|
||||||
|
|
||||||
|
/** @internal */
|
||||||
interface LoggerGetter
|
interface LoggerGetter
|
||||||
{
|
{
|
||||||
public function getLogger(): Logger;
|
public function getLogger(): Logger;
|
||||||
|
Loading…
Reference in New Issue
Block a user