1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00

Update to Psalm 5.4

This commit is contained in:
Aaron Piotrowski 2022-12-28 17:17:59 -06:00
parent 435b7038e8
commit ce518ce058
No known key found for this signature in database
GPG Key ID: 5B456E6AABA44A63
2 changed files with 3 additions and 2 deletions

View File

@ -51,7 +51,7 @@
"amphp/phpunit-util": "^3",
"phpunit/phpunit": "^9",
"amphp/php-cs-fixer-config": "^2-dev",
"psalm/phar": "^4.20"
"psalm/phar": "^5.4"
},
"autoload": {
"psr-4": {

View File

@ -94,7 +94,7 @@ abstract class Socket
$pending = $this->pending[$id];
unset($this->pending[$id]);
$pending->deferred->complete(static fn () => $message);
$pending->deferred?->complete(static fn () => $message);
$pending->deferred = null;
}
@ -135,6 +135,7 @@ abstract class Socket
/** @var DeferredFuture<\Closure():Message> $deferred */
$deferred = new DeferredFuture;
/** @psalm-suppress InaccessibleProperty $this->pending is an ArrayObject */
$this->pending[$id] = new class($this->pending, $id, $deferred, $question, $timeout) {
private readonly string $callbackId;