diff --git a/src/Traits/MessageResponseTrait.php b/src/Traits/MessageResponseTrait.php index ad2f23419..7c50e040b 100644 --- a/src/Traits/MessageResponseTrait.php +++ b/src/Traits/MessageResponseTrait.php @@ -29,12 +29,11 @@ public function getProtocolVersion(): string return $this->response->getProtocolVersion(); } - /** - * @return MessageInterface - */ public function withProtocolVersion($version): MessageInterface { - return $this->response->withProtocolVersion($version); + $this->response->withProtocolVersion($version); + + return $this; } public function getHeaders(): array @@ -57,44 +56,37 @@ public function getHeaderLine(string $name): string return $this->response->getHeaderLine($name); } - /** - * @return MessageInterface - */ public function withHeader(string $name, $value): MessageInterface { - return $this->response->withHeader($name, $value); + $this->response->withHeader($name, $value); + + return $this; } - /** - * @return MessageInterface - */ public function withAddedHeader(string $name, $value): MessageInterface { - return $this->response->withAddedHeader($name, $value); + $this->response->withAddedHeader($name, $value); + + return $this; } - /** - * @return MessageInterface - */ public function withoutHeader(string $name): MessageInterface { - return $this->response->withoutHeader($name); + $this->response->withoutHeader($name); + + return $this; } - /** - * @return StreamInterface - */ public function getBody(): StreamInterface { return $this->response->getBody(); } - /** - * @return MessageInterface - */ public function withBody(StreamInterface $body): MessageInterface { - return $this->response->withBody($body); + $this->response->withBody($body); + + return $this; } public function getStatusCode(): int @@ -102,16 +94,15 @@ public function getStatusCode(): int return $this->response->getStatusCode(); } - /** - * @return ResponseInterface - */ public function withStatus(int $code, string $reasonPhrase = ''): ResponseInterface { - return $this->response->withStatus($code, $reasonPhrase); + $this->response->withStatus($code, $reasonPhrase); + + return $this; } public function getReasonPhrase(): string { return $this->response->getReasonPhrase(); } -} \ No newline at end of file +}