diff options
author | Paramtamtam <[email protected]> | 2019-12-25 23:00:22 +0500 |
---|---|---|
committer | Paramtamtam <[email protected]> | 2019-12-25 23:00:22 +0500 |
commit | 4016bdf2d53faca43408dd28b0809a45d508d338 (patch) | |
tree | 2eda37a4a0c4b5b65ad9a0df067f466be9778707 /src/HttpClient.php | |
parent | 2e0f9fac31764ff137ff0e1a03bfc332f94e1e0f (diff) |
PHP sources updated (phpstan level MAX)
Diffstat (limited to 'src/HttpClient.php')
-rw-r--r-- | src/HttpClient.php | 8 |
1 files changed, 4 insertions, 4 deletions
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]) ); } } |