Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 72f3089

Browse files
committed
Fix: Return static instead of self
1 parent 5f5280d commit 72f3089

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/MessageTrait.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function getProtocolVersion()
6666
* new protocol version.
6767
*
6868
* @param string $version HTTP protocol version
69-
* @return self
69+
* @return static
7070
*/
7171
public function withProtocolVersion($version)
7272
{
@@ -184,7 +184,7 @@ public function getHeaderLine($header)
184184
*
185185
* @param string $header Case-insensitive header field name.
186186
* @param string|string[] $value Header value(s).
187-
* @return self
187+
* @return static
188188
* @throws \InvalidArgumentException for invalid header names or values.
189189
*/
190190
public function withHeader($header, $value)
@@ -225,7 +225,7 @@ public function withHeader($header, $value)
225225
*
226226
* @param string $header Case-insensitive header field name to add.
227227
* @param string|string[] $value Header value(s).
228-
* @return self
228+
* @return static
229229
* @throws \InvalidArgumentException for invalid header names or values.
230230
*/
231231
public function withAddedHeader($header, $value)
@@ -265,7 +265,7 @@ public function withAddedHeader($header, $value)
265265
* the named header.
266266
*
267267
* @param string $header Case-insensitive header field name to remove.
268-
* @return self
268+
* @return static
269269
*/
270270
public function withoutHeader($header)
271271
{
@@ -301,7 +301,7 @@ public function getBody()
301301
* new body stream.
302302
*
303303
* @param StreamInterface $body Body.
304-
* @return self
304+
* @return static
305305
* @throws \InvalidArgumentException When the body is not valid.
306306
*/
307307
public function withBody(StreamInterface $body)

src/RequestTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function getRequestTarget()
155155
* @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various
156156
* request-target forms allowed in request messages)
157157
* @param mixed $requestTarget
158-
* @return self
158+
* @return static
159159
* @throws InvalidArgumentException if the request target is invalid.
160160
*/
161161
public function withRequestTarget($requestTarget)
@@ -193,7 +193,7 @@ public function getMethod()
193193
* changed request method.
194194
*
195195
* @param string $method Case-insensitive method.
196-
* @return self
196+
* @return static
197197
* @throws InvalidArgumentException for invalid HTTP methods.
198198
*/
199199
public function withMethod($method)
@@ -241,7 +241,7 @@ public function getUri()
241241
* @link http://tools.ietf.org/html/rfc3986#section-4.3
242242
* @param UriInterface $uri New request URI to use.
243243
* @param bool $preserveHost Preserve the original state of the Host header.
244-
* @return self
244+
* @return static
245245
*/
246246
public function withUri(UriInterface $uri, $preserveHost = false)
247247
{

0 commit comments

Comments
 (0)