aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/FeedItem.php2
-rw-r--r--lib/http.php9
2 files changed, 8 insertions, 3 deletions
diff --git a/lib/FeedItem.php b/lib/FeedItem.php
index bd37f119..fc4549a7 100644
--- a/lib/FeedItem.php
+++ b/lib/FeedItem.php
@@ -178,7 +178,6 @@ class FeedItem
} else {
$this->author = $author;
}
- return $this;
}
public function getContent(): ?string
@@ -284,7 +283,6 @@ class FeedItem
} else {
$this->misc[$name] = $value;
}
- return $this;
}
public function toArray(): array
diff --git a/lib/http.php b/lib/http.php
index e4f9bf48..39f0c727 100644
--- a/lib/http.php
+++ b/lib/http.php
@@ -331,7 +331,14 @@ final class Response
return array_pop($header);
}
- public function withBody(string $body): Response
+ public function withHeader(string $name, string $value): self
+ {
+ $clone = clone $this;
+ $clone->headers[$name] = [$value];
+ return $clone;
+ }
+
+ public function withBody(string $body): self
{
$clone = clone $this;
$clone->body = $body;