mirror of
https://github.com/friendica/friendica
synced 2025-04-24 05:50:11 +00:00
Fix overly strict return value for terminateFriendship methods
This commit is contained in:
parent
ba511c3b52
commit
456ae169ab
2 changed files with 4 additions and 4 deletions
|
@ -213,11 +213,11 @@ class Protocol
|
||||||
*
|
*
|
||||||
* @param array $user User unfriending
|
* @param array $user User unfriending
|
||||||
* @param array $contact Contact unfriended
|
* @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 HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @throws \ImagickException
|
||||||
*/
|
*/
|
||||||
public static function terminateFriendship(array $user, array $contact): bool
|
public static function terminateFriendship(array $user, array $contact): ?bool
|
||||||
{
|
{
|
||||||
if (empty($contact['network'])) {
|
if (empty($contact['network'])) {
|
||||||
throw new \InvalidArgumentException('Missing network key in contact array');
|
throw new \InvalidArgumentException('Missing network key in contact array');
|
||||||
|
|
|
@ -832,11 +832,11 @@ class Contact
|
||||||
* @param array $user User unfriending
|
* @param array $user User unfriending
|
||||||
* @param array $contact Contact (uid != 0) unfriended
|
* @param array $contact Contact (uid != 0) unfriended
|
||||||
* @param boolean $two_way Revoke eventual inbound follow as well
|
* @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 HTTPException\InternalServerErrorException
|
||||||
* @throws \ImagickException
|
* @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);
|
$result = Protocol::terminateFriendship($user, $contact);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue