From 456ae169aba480141c43616eca385605aa1911d4 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Wed, 6 Oct 2021 20:18:44 -0400 Subject: [PATCH] Fix overly strict return value for terminateFriendship methods --- src/Core/Protocol.php | 4 ++-- src/Model/Contact.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/Protocol.php b/src/Core/Protocol.php index 8583ac243c..3484d281b1 100644 --- a/src/Core/Protocol.php +++ b/src/Core/Protocol.php @@ -213,11 +213,11 @@ class Protocol * * @param array $user User unfriending * @param array $contact Contact unfriended - * @return bool|null true if successful, false if not, null if no action was performed + * @return bool|null true if successful, false if not, null if no remote action was performed * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public static function terminateFriendship(array $user, array $contact): bool + public static function terminateFriendship(array $user, array $contact): ?bool { if (empty($contact['network'])) { throw new \InvalidArgumentException('Missing network key in contact array'); diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 83ca33639a..cbe370a4aa 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -832,11 +832,11 @@ class Contact * @param array $user User unfriending * @param array $contact Contact (uid != 0) unfriended * @param boolean $two_way Revoke eventual inbound follow as well - * @return bool|null true if successful, false if not, null if no action was performed + * @return bool|null true if successful, false if not, null if no remote action was performed * @throws HTTPException\InternalServerErrorException * @throws \ImagickException */ - public static function terminateFriendship(array $user, array $contact): bool + public static function terminateFriendship(array $user, array $contact): ?bool { $result = Protocol::terminateFriendship($user, $contact);