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

Commit

Permalink
Fix: Return static instead of self
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed May 31, 2015
1 parent 5f5280d commit 72f3089
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/MessageTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getProtocolVersion()
* new protocol version.
*
* @param string $version HTTP protocol version
* @return self
* @return static
*/
public function withProtocolVersion($version)
{
Expand Down Expand Up @@ -184,7 +184,7 @@ public function getHeaderLine($header)
*
* @param string $header Case-insensitive header field name.
* @param string|string[] $value Header value(s).
* @return self
* @return static
* @throws \InvalidArgumentException for invalid header names or values.
*/
public function withHeader($header, $value)
Expand Down Expand Up @@ -225,7 +225,7 @@ public function withHeader($header, $value)
*
* @param string $header Case-insensitive header field name to add.
* @param string|string[] $value Header value(s).
* @return self
* @return static
* @throws \InvalidArgumentException for invalid header names or values.
*/
public function withAddedHeader($header, $value)
Expand Down Expand Up @@ -265,7 +265,7 @@ public function withAddedHeader($header, $value)
* the named header.
*
* @param string $header Case-insensitive header field name to remove.
* @return self
* @return static
*/
public function withoutHeader($header)
{
Expand Down Expand Up @@ -301,7 +301,7 @@ public function getBody()
* new body stream.
*
* @param StreamInterface $body Body.
* @return self
* @return static
* @throws \InvalidArgumentException When the body is not valid.
*/
public function withBody(StreamInterface $body)
Expand Down
6 changes: 3 additions & 3 deletions src/RequestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public function getRequestTarget()
* @link http://tools.ietf.org/html/rfc7230#section-2.7 (for the various
* request-target forms allowed in request messages)
* @param mixed $requestTarget
* @return self
* @return static
* @throws InvalidArgumentException if the request target is invalid.
*/
public function withRequestTarget($requestTarget)
Expand Down Expand Up @@ -193,7 +193,7 @@ public function getMethod()
* changed request method.
*
* @param string $method Case-insensitive method.
* @return self
* @return static
* @throws InvalidArgumentException for invalid HTTP methods.
*/
public function withMethod($method)
Expand Down Expand Up @@ -241,7 +241,7 @@ public function getUri()
* @link http://tools.ietf.org/html/rfc3986#section-4.3
* @param UriInterface $uri New request URI to use.
* @param bool $preserveHost Preserve the original state of the Host header.
* @return self
* @return static
*/
public function withUri(UriInterface $uri, $preserveHost = false)
{
Expand Down

0 comments on commit 72f3089

Please sign in to comment.