Skip to content

Commit 18619ee

Browse files
committed
Merge pull request #12 from weierophinney/hotfix/message-mutability
setBody() MUST receive a StreamableInterface
2 parents 8d0a1c5 + 2ebdfc1 commit 18619ee

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

src/OutgoingRequestInterface.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,11 @@ public function removeHeader($header);
111111
/**
112112
* Sets the body of the message.
113113
*
114-
* The body MUST be a StreamableInterface object. Setting the body to null MUST
115-
* remove the existing body.
114+
* The body MUST be a StreamableInterface object.
116115
*
117-
* @param StreamableInterface|null $body Body.
116+
* @param StreamableInterface $body Body.
118117
* @return void
119118
* @throws \InvalidArgumentException When the body is not valid.
120119
*/
121-
public function setBody(StreamableInterface $body = null);
120+
public function setBody(StreamableInterface $body);
122121
}

src/OutgoingResponseInterface.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,11 @@ public function removeHeader($header);
109109
/**
110110
* Sets the body of the message.
111111
*
112-
* The body MUST be a StreamableInterface object. Setting the body to null MUST
113-
* remove the existing body.
112+
* The body MUST be a StreamableInterface object.
114113
*
115-
* @param StreamableInterface|null $body Body.
114+
* @param StreamableInterface $body Body.
116115
* @return void
117116
* @throws \InvalidArgumentException When the body is not valid.
118117
*/
119-
public function setBody(StreamableInterface $body = null);
118+
public function setBody(StreamableInterface $body);
120119
}

0 commit comments

Comments
 (0)