diff --git a/src/danog/MadelineProto/AnnotationsBuilder.php b/src/danog/MadelineProto/AnnotationsBuilder.php index f03cc7ccc..ee10aecd9 100644 --- a/src/danog/MadelineProto/AnnotationsBuilder.php +++ b/src/danog/MadelineProto/AnnotationsBuilder.php @@ -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; } diff --git a/src/danog/MadelineProto/Db/DbArray.php b/src/danog/MadelineProto/Db/DbArray.php index fa01e4eef..6e0a3b2cc 100644 --- a/src/danog/MadelineProto/Db/DbArray.php +++ b/src/danog/MadelineProto/Db/DbArray.php @@ -15,7 +15,7 @@ interface DbArray extends DbType, \ArrayAccess, \Countable /** * Get Array copy. * - * @psalm-return Promise $value + * @psalm-return Promise> $value * * @return Promise */ diff --git a/src/danog/MadelineProto/Db/DriverArray.php b/src/danog/MadelineProto/Db/DriverArray.php index d79360aff..64b409889 100644 --- a/src/danog/MadelineProto/Db/DriverArray.php +++ b/src/danog/MadelineProto/Db/DriverArray.php @@ -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); diff --git a/src/danog/MadelineProto/Db/MemoryArray.php b/src/danog/MadelineProto/Db/MemoryArray.php index 6de206924..71d5cb31a 100644 --- a/src/danog/MadelineProto/Db/MemoryArray.php +++ b/src/danog/MadelineProto/Db/MemoryArray.php @@ -24,7 +24,7 @@ class MemoryArray extends \ArrayIterator implements DbArray * @param mixed $value * @param string $tablePrefix * @param Memory $settings - * @return Promise + * @return Promise */ public static function getInstance(string $name, $value = null, string $tablePrefix = '', $settings): Promise { diff --git a/src/danog/MadelineProto/Db/MysqlArray.php b/src/danog/MadelineProto/Db/MysqlArray.php index bb7bf407e..f729e8228 100644 --- a/src/danog/MadelineProto/Db/MysqlArray.php +++ b/src/danog/MadelineProto/Db/MysqlArray.php @@ -79,7 +79,7 @@ class MysqlArray extends SqlArray * * @link https://php.net/manual/en/arrayiterator.offsetset.php * - * @param string $index

+ * @param string|int $index

* The index to set for. *

* @param $value @@ -118,7 +118,7 @@ class MysqlArray extends SqlArray * * @link https://php.net/manual/en/arrayiterator.offsetunset.php * - * @param string $index

+ * @param string|int $index

* The offset to unset. *

* @@ -138,12 +138,6 @@ class MysqlArray extends SqlArray ); } - /** - * Get array copy. - * - * @return Promise - * @throws \Throwable - */ public function getArrayCopy(): Promise { return call(function () {