From 4016bdf2d53faca43408dd28b0809a45d508d338 Mon Sep 17 00:00:00 2001 From: Paramtamtam Date: Wed, 25 Dec 2019 23:00:22 +0500 Subject: PHP sources updated (phpstan level MAX) --- src/HttpClient.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/HttpClient.php') diff --git a/src/HttpClient.php b/src/HttpClient.php index 6308eabc..42c434a8 100644 --- a/src/HttpClient.php +++ b/src/HttpClient.php @@ -31,8 +31,8 @@ final class HttpClient } /** - * @return array|null Request information as ['ctx'=>[], 'body'=>string] - * or null if termination request or invalid context. + * @return mixed[]|null Request information as ['ctx'=>[], 'body'=>string] + * or null if termination request or invalid context. */ public function acceptRequest() { @@ -43,7 +43,7 @@ final class HttpClient } $ctx = json_decode($ctx, true); - if (is_null($ctx)) { + if ($ctx === null) { // invalid context return null; } @@ -69,7 +69,7 @@ final class HttpClient $this->getWorker()->send( $body, - json_encode(['status' => $status, 'headers' => $headers]) + (string) json_encode(['status' => $status, 'headers' => $headers]) ); } } -- cgit v1.2.3