From 7e463bb748b0a5930c7a71334bf21ecb0ab72967 Mon Sep 17 00:00:00 2001 From: StyleCI Bot Date: Sun, 5 Feb 2023 16:53:28 +0000 Subject: [PATCH] Apply fixes from StyleCI --- src/Endpoints/Comments.php | 12 +++++------- src/Entities/Collections/CommentCollection.php | 1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Endpoints/Comments.php b/src/Endpoints/Comments.php index 22d1ca0..84acfd7 100644 --- a/src/Endpoints/Comments.php +++ b/src/Endpoints/Comments.php @@ -2,8 +2,6 @@ namespace FiveamCode\LaravelNotionApi\Endpoints; -use FiveamCode\LaravelNotionApi\Entities\Blocks\Block as BlockEntity; -use FiveamCode\LaravelNotionApi\Entities\Collections\BlockCollection; use FiveamCode\LaravelNotionApi\Entities\Collections\CommentCollection; use FiveamCode\LaravelNotionApi\Entities\Comment; use FiveamCode\LaravelNotionApi\Exceptions\HandlingException; @@ -52,7 +50,7 @@ public function __construct(Notion $notion) public function ofBlock(string $blockId): CommentCollection { $response = $this->get( - $this->url(Endpoint::COMMENTS . "?block_id={$blockId}&{$this->buildPaginationQuery()}") + $this->url(Endpoint::COMMENTS."?block_id={$blockId}&{$this->buildPaginationQuery()}") ); return new CommentCollection($response->json()); @@ -60,31 +58,31 @@ public function ofBlock(string $blockId): CommentCollection /** * @param string $discussionId - * * @return Comments */ public function onDiscussion(string $discussionId): self { - if($this->pageId !== null) { + if ($this->pageId !== null) { throw new HandlingException('You can only use ``->onDiscussion(...)`` or ``->onPage(...)``.'); } $this->discussionId = $discussionId; + return $this; } /** * @param string $pageId - * * @return Comments */ public function onPage(string $pageId): self { - if($this->discussionId !== null) { + if ($this->discussionId !== null) { throw new HandlingException('You can only use ``->onDiscussion(...)`` or ``->onPage(...)``.'); } $this->pageId = $pageId; + return $this; } diff --git a/src/Entities/Collections/CommentCollection.php b/src/Entities/Collections/CommentCollection.php index 3db076e..103c314 100644 --- a/src/Entities/Collections/CommentCollection.php +++ b/src/Entities/Collections/CommentCollection.php @@ -2,7 +2,6 @@ namespace FiveamCode\LaravelNotionApi\Entities\Collections; -use FiveamCode\LaravelNotionApi\Entities\Blocks\Block; use FiveamCode\LaravelNotionApi\Entities\Comment; use Illuminate\Support\Collection;