From 16ef3926c93ba295728158c77a76a1ea54d51c67 Mon Sep 17 00:00:00 2001 From: Lennart Kuijs Date: Wed, 4 Dec 2024 16:14:46 +0100 Subject: [PATCH] fix: linting --- lib/GetStream/StreamChat/Channel.php | 118 +++++++++++++-------------- 1 file changed, 59 insertions(+), 59 deletions(-) diff --git a/lib/GetStream/StreamChat/Channel.php b/lib/GetStream/StreamChat/Channel.php index 3176df0..07741bf 100644 --- a/lib/GetStream/StreamChat/Channel.php +++ b/lib/GetStream/StreamChat/Channel.php @@ -544,77 +544,77 @@ public function unmute(string $userId): StreamResponse ]; return $this->client->post("moderation/unmute/channel", $postData); } -} -/** Pins the channel for the user. - * @throws StreamException - */ -public function pin(string $userId): StreamResponse -{ - if (empty($userId)) { - throw new StreamException("user ID must be not empty"); + /** Pins the channel for the user. + * @throws StreamException + */ + public function pin(string $userId): StreamResponse + { + if (empty($userId)) { + throw new StreamException("user ID must be not empty"); + } + + $payload = [ + "set" => [ + "pinned" => true + ] + ]; + + return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); } - $payload = [ - "set" => [ - "pinned" => true - ] - ]; - return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); -} + /** Unpins the channel for the user. + * @throws StreamException + */ + public function unpin(string $userId): StreamResponse + { + if (empty($userId)) { + throw new StreamException("user ID must be not empty"); + } + $payload = [ + "set" => [ + "pinned" => false + ] + ]; -/** Unpins the channel for the user. - * @throws StreamException - */ -public function unpin(string $userId): StreamResponse -{ - if (empty($userId)) { - throw new StreamException("user ID must be not empty"); + return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); } - $payload = [ - "set" => [ - "pinned" => false - ] - ]; + /** Archives the channel for the user. + * @throws StreamException + */ + public function pin(string $userId): StreamResponse + { + if (empty($userId)) { + throw new StreamException("user ID must be not empty"); + } - return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); -} + $payload = [ + "set" => [ + "archived" => true + ] + ]; -/** Archives the channel for the user. - * @throws StreamException - */ -public function pin(string $userId): StreamResponse -{ - if (empty($userId)) { - throw new StreamException("user ID must be not empty"); + return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); } - $payload = [ - "set" => [ - "archived" => true - ] - ]; + /** Unarchives the channel for the user. + * @throws StreamException + */ + public function pin(string $userId): StreamResponse + { + if (empty($userId)) { + throw new StreamException("user ID must be not empty"); + } - return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); -} + $payload = [ + "set" => [ + "archived" => false + ] + ]; -/** Unarchives the channel for the user. - * @throws StreamException - */ -public function pin(string $userId): StreamResponse -{ - if (empty($userId)) { - throw new StreamException("user ID must be not empty"); + return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); } - - $payload = [ - "set" => [ - "archived" => false - ] - ]; - - return $this->client->patch($this->getUrl() . "/member/" . urlencode($userId), $payload); -} \ No newline at end of file +}