Rename Reader to Consumer and Writer to Producer

This commit is contained in:
2021-01-23 01:35:09 +03:00
parent bf738254b1
commit 6eeb2939c8
7 changed files with 27 additions and 25 deletions

View File

@@ -44,7 +44,7 @@ final class Response
return self::TYPE_RESPONSE === $this->type && self::HEARTBEAT === $this->buffer->bytes();
}
public function toMessage(Reader $reader): Message
public function toMessage(Consumer $reader): Message
{
if (self::TYPE_MESSAGE !== $this->type) {
throw new Exception(sprintf('Expecting "%s" type, but NSQ return: "%s"', self::TYPE_MESSAGE, $this->type));