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/Worker.php | |
parent | 2e0f9fac31764ff137ff0e1a03bfc332f94e1e0f (diff) |
PHP sources updated (phpstan level MAX)
Diffstat (limited to 'src/Worker.php')
-rw-r--r-- | src/Worker.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Worker.php b/src/Worker.php index 87dcc9ce..35294221 100644 --- a/src/Worker.php +++ b/src/Worker.php @@ -66,7 +66,7 @@ class Worker } if ($flags & Relay::PAYLOAD_ERROR) { - return new \Error($body); + return new \Error((string) $body); } return $body; @@ -83,13 +83,13 @@ class Worker */ public function send(string $payload = null, string $header = null): void { - if (is_null($header)) { - $this->relay->send($header, Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_NONE); + if ($header === null) { + $this->relay->send('', Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_NONE); } else { $this->relay->send($header, Relay::PAYLOAD_CONTROL | Relay::PAYLOAD_RAW); } - $this->relay->send($payload, Relay::PAYLOAD_RAW); + $this->relay->send((string) $payload, Relay::PAYLOAD_RAW); } /** |