]> git.mxchange.org Git - friendica.git/commitdiff
Fix overly strict return value for revokeFollow methods
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Oct 2021 02:36:31 +0000 (22:36 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 9 Oct 2021 06:08:04 +0000 (02:08 -0400)
src/Core/Protocol.php
src/Model/Contact.php

index 3484d281b1c52bbf904f9c5725dda759e083f6b2..796add5558184cc423a402bbcb6cfcdc4cf2d66d 100644 (file)
@@ -269,7 +269,7 @@ class Protocol
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function revokeFollow(array $contact)
+       public static function revokeFollow(array $contact): ?bool
        {
                if (empty($contact['network'])) {
                        throw new \InvalidArgumentException('Missing network key in contact array');
index cbe370a4aa8250d35a899d3b1de59d2e32105adf..918eab384fdc55c0ac041fff1400b298f28eb17b 100644 (file)
@@ -857,7 +857,7 @@ class Contact
         * @throws HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public static function revokeFollow(array $contact): bool
+       public static function revokeFollow(array $contact): ?bool
        {
                if (empty($contact['network'])) {
                        throw new \InvalidArgumentException('Empty network in contact array');