X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FWidget%2FContactBlock.php;h=e206dbcb4e349878ceca518b3e9566677417d009;hb=2b1fc4b5615b0bc4a003ab941e4762e92eea4aa3;hp=041f1a89ead577e2abd72418263c0672f953961b;hpb=e56a53647bd5469551bf4f9ef2df50a5dd16b943;p=friendica.git diff --git a/src/Content/Widget/ContactBlock.php b/src/Content/Widget/ContactBlock.php index 041f1a89ea..e206dbcb4e 100644 --- a/src/Content/Widget/ContactBlock.php +++ b/src/Content/Widget/ContactBlock.php @@ -1,6 +1,6 @@ array, output=>string) - * @return string + * @return string Formatted HTML code or empty string */ - public static function getHTML(array $profile, int $visitor_uid = null) + public static function getHTML(array $profile, int $visitor_uid = null): string { $o = ''; @@ -66,13 +66,13 @@ class ContactBlock $contacts = []; $total = DBA::count('contact', [ - 'uid' => $profile['uid'], - 'self' => false, + 'uid' => $profile['uid'], + 'self' => false, 'blocked' => false, 'pending' => false, - 'hidden' => false, + 'hidden' => false, 'archive' => false, - 'failed' => false, + 'failed' => false, 'network' => [Protocol::DFRN, Protocol::ACTIVITYPUB, Protocol::OSTATUS, Protocol::DIASPORA, Protocol::FEED], ]); @@ -89,15 +89,17 @@ class ContactBlock } $personal_contacts = DBA::selectToArray('contact', ['uri-id'], [ - 'uid' => $profile['uid'], - 'self' => false, + 'uid' => $profile['uid'], + 'self' => false, 'blocked' => false, 'pending' => false, - 'hidden' => false, + 'hidden' => false, 'archive' => false, - 'rel' => $rel, + 'rel' => $rel, 'network' => Protocol::FEDERATED, - ], ['limit' => $shown]); + ], [ + 'limit' => $shown, + ]); $contact_uriids = array_column($personal_contacts, 'uri-id');