Skip to content

Commit

Permalink
enhance type hinting for \Swoole\FastCGI\Message::withBody() method (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
deminy committed Feb 5, 2024
1 parent c276497 commit 1bc74de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/FastCGI/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HttpResponse extends Response
public function __construct(array $records = [])
{
parent::__construct($records);
$body = (string) $this->getBody();
$body = $this->getBody();
if (strlen($body) === 0) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/FastCGI/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getBody(): string
return $this->body;
}

public function withBody($body): self
public function withBody(string|\Stringable $body): self
{
$this->body = (string) $body;
return $this;
Expand Down

0 comments on commit 1bc74de

Please sign in to comment.