Skip to content

Commit c92edf8

Browse files
committed
Update Psalm and fix issues
1 parent 81774a2 commit c92edf8

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"amphp/phpunit-util": "^3",
5353
"amphp/php-cs-fixer-config": "^2",
5454
"phpunit/phpunit": "^9",
55-
"psalm/phar": "^5.11"
55+
"psalm/phar": "~5.26.1"
5656
},
5757
"minimum-stability": "dev",
5858
"prefer-stable": true,

src/Internal/ContextClusterWorker.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,9 @@ public function shutdown(?Cancellation $cancellation = null): void
148148
}
149149
}
150150

151+
/**
152+
* @psalm-suppress MissingParamType Type missing for compatibility with old versions of psr/log.
153+
*/
151154
public function log($level, $message, array $context = []): void
152155
{
153156
$context['id'] = $this->id;

src/Internal/TransferSocket.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ public function receiveSocket(): ?TransferredResource
9090
\socket_clear_error();
9191

9292
try {
93-
if (!\socket_recvmsg($this->socket, $data, \MSG_DONTWAIT)) {
93+
if (\socket_recvmsg($this->socket, $data, \MSG_DONTWAIT) === false) {
9494
/* Purposely omitting $this->socket from socket_last_error(),
9595
* as the error will not be socket-specific. */
9696
$errorCode = \socket_last_error();
@@ -141,12 +141,12 @@ public function sendSocket($stream, string $data): bool
141141
\socket_clear_error($this->socket);
142142

143143
try {
144-
if (!\socket_sendmsg($this->socket, [
144+
if (\socket_sendmsg($this->socket, [
145145
"iov" => [$data],
146146
"control" => [
147147
["level" => \SOL_SOCKET, "type" => \SCM_RIGHTS, "data" => [$stream]],
148148
],
149-
], \MSG_DONTWAIT)) {
149+
], \MSG_DONTWAIT) === false) {
150150
$errorCode = \socket_last_error($this->socket);
151151
if ($errorCode === \SOCKET_EAGAIN) {
152152
// Socket buffer full, try again later.

0 commit comments

Comments
 (0)