From af6e87946d7e13b3446db32515e70c6684550ea4 Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Thu, 25 Jan 2024 13:57:25 +0100 Subject: [PATCH] Fix tests --- models/Message.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/models/Message.php b/models/Message.php index 4b6d78c8..93b71b99 100644 --- a/models/Message.php +++ b/models/Message.php @@ -281,11 +281,11 @@ public function unpin($userId = null) * * If it's the last user, the whole message will be deleted. * - * @param int $userId + * @param int|null $userId * @throws \Throwable * @throws \yii\db\StaleObjectException */ - public function leave($userId) + public function leave($userId = null) { $userMessage = $this->getUserMessage($userId); if (!$userMessage) {