Skip to content

Commit 91f2cc2

Browse files
committed
polish error message in Comment Endpoint
1 parent 76a287a commit 91f2cc2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Endpoints/Comments.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function __construct(Notion $notion)
5050
public function ofBlock(string $blockId): CommentCollection
5151
{
5252
$response = $this->get(
53-
$this->url(Endpoint::COMMENTS."?block_id={$blockId}&{$this->buildPaginationQuery()}")
53+
$this->url(Endpoint::COMMENTS . "?block_id={$blockId}&{$this->buildPaginationQuery()}")
5454
);
5555

5656
return new CommentCollection($response->json());
@@ -63,7 +63,7 @@ public function ofBlock(string $blockId): CommentCollection
6363
public function onDiscussion(string $discussionId): self
6464
{
6565
if ($this->pageId !== null) {
66-
throw new HandlingException('You can only use ``->onDiscussion(...)`` or ``->onPage(...)``.');
66+
throw new HandlingException('You can only use `onDiscussion()` or `onPage()`.');
6767
}
6868

6969
$this->discussionId = $discussionId;
@@ -78,7 +78,7 @@ public function onDiscussion(string $discussionId): self
7878
public function onPage(string $pageId): self
7979
{
8080
if ($this->discussionId !== null) {
81-
throw new HandlingException('You can only use ``->onDiscussion(...)`` or ``->onPage(...)``.');
81+
throw new HandlingException('You can only use `onDiscussion()` or `onPage()`.');
8282
}
8383

8484
$this->pageId = $pageId;
@@ -89,7 +89,7 @@ public function onPage(string $pageId): self
8989
public function create($comment): Comment
9090
{
9191
if ($this->discussionId === null && $this->pageId === null) {
92-
throw new HandlingException('You must use ``->onDiscussion(...)`` or ``->onPage(...)``.');
92+
throw new HandlingException('You must use `onDiscussion()` or `onPage()`.');
9393
}
9494

9595
$body = $comment->getRawResponse();

0 commit comments

Comments
 (0)