mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-22 18:51:13 +01:00
Fix hints
This commit is contained in:
parent
d31b798df9
commit
a21f8205e5
@ -58,7 +58,8 @@ class AnnotationsBuilder
|
||||
$this->namespace = $namespace;
|
||||
/** @psalm-suppress InvalidArgument */
|
||||
$this->TL = new TL(new class($logger) {
|
||||
public function __construct($logger)
|
||||
public Logger $logger;
|
||||
public function __construct(Logger $logger)
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@ interface DbArray extends DbType, \ArrayAccess, \Countable
|
||||
/**
|
||||
* Get Array copy.
|
||||
*
|
||||
* @psalm-return Promise<array{0: string|int, 1: T}> $value
|
||||
* @psalm-return Promise<array<string|int, T>> $value
|
||||
*
|
||||
* @return Promise
|
||||
*/
|
||||
|
@ -29,7 +29,10 @@ abstract class DriverArray implements DbArray
|
||||
{
|
||||
if (isset($this->settings) && \is_array($this->settings)) {
|
||||
$clazz = (new ReflectionClass($this))->getProperty('dbSettings')->getType()->getName();
|
||||
/** @var SettingsAbstract */
|
||||
/**
|
||||
* @var SettingsAbstract
|
||||
* @psalm-suppress UndefinedThisPropertyAssignment
|
||||
*/
|
||||
$this->dbSettings = new $clazz;
|
||||
$this->dbSettings->mergeArray($this->settings);
|
||||
unset($this->settings);
|
||||
|
@ -24,7 +24,7 @@ class MemoryArray extends \ArrayIterator implements DbArray
|
||||
* @param mixed $value
|
||||
* @param string $tablePrefix
|
||||
* @param Memory $settings
|
||||
* @return Promise
|
||||
* @return Promise<self>
|
||||
*/
|
||||
public static function getInstance(string $name, $value = null, string $tablePrefix = '', $settings): Promise
|
||||
{
|
||||
|
@ -79,7 +79,7 @@ class MysqlArray extends SqlArray
|
||||
*
|
||||
* @link https://php.net/manual/en/arrayiterator.offsetset.php
|
||||
*
|
||||
* @param string $index <p>
|
||||
* @param string|int $index <p>
|
||||
* The index to set for.
|
||||
* </p>
|
||||
* @param $value
|
||||
@ -118,7 +118,7 @@ class MysqlArray extends SqlArray
|
||||
*
|
||||
* @link https://php.net/manual/en/arrayiterator.offsetunset.php
|
||||
*
|
||||
* @param string $index <p>
|
||||
* @param string|int $index <p>
|
||||
* The offset to unset.
|
||||
* </p>
|
||||
*
|
||||
@ -138,12 +138,6 @@ class MysqlArray extends SqlArray
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get array copy.
|
||||
*
|
||||
* @return Promise<array>
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function getArrayCopy(): Promise
|
||||
{
|
||||
return call(function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user