Skip to content

Fix type data in response builder #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 13, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/ResponseBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public function __construct(MockBuilder $mockBuilder)
$this->response = new Response();
}

public function statusCode($statusCode) : self
public function statusCode(int $statusCode) : self
{
$this->response = $this->response->withStatus($statusCode);

return $this;
}

public function body($body)
public function body(string $body) : self
{
$this->response = $this->response->withBody(stream_for($body));

Expand All @@ -47,7 +47,7 @@ public function callback(Closure $callback) : self
return $this;
}

public function header($header, $value) : self
public function header(string $header, string $value) : self
{
$this->response = $this->response->withHeader($header, $value);

Expand Down