Skip to content

Commit

Permalink
Merge pull request #12 from weierophinney/hotfix/message-mutability
Browse files Browse the repository at this point in the history
setBody() MUST receive a StreamableInterface
  • Loading branch information
philsturgeon committed Nov 4, 2014
2 parents 8d0a1c5 + 2ebdfc1 commit 18619ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
7 changes: 3 additions & 4 deletions src/OutgoingRequestInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,11 @@ public function removeHeader($header);
/**
* Sets the body of the message.
*
* The body MUST be a StreamableInterface object. Setting the body to null MUST
* remove the existing body.
* The body MUST be a StreamableInterface object.
*
* @param StreamableInterface|null $body Body.
* @param StreamableInterface $body Body.
* @return void
* @throws \InvalidArgumentException When the body is not valid.
*/
public function setBody(StreamableInterface $body = null);
public function setBody(StreamableInterface $body);
}
7 changes: 3 additions & 4 deletions src/OutgoingResponseInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,11 @@ public function removeHeader($header);
/**
* Sets the body of the message.
*
* The body MUST be a StreamableInterface object. Setting the body to null MUST
* remove the existing body.
* The body MUST be a StreamableInterface object.
*
* @param StreamableInterface|null $body Body.
* @param StreamableInterface $body Body.
* @return void
* @throws \InvalidArgumentException When the body is not valid.
*/
public function setBody(StreamableInterface $body = null);
public function setBody(StreamableInterface $body);
}

0 comments on commit 18619ee

Please sign in to comment.