X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FContent%2FContactSelector.php;h=db7ad80ca638664dc50615a11e3736a8d04710a3;hb=fefe9cd5c918f71c374ffbc43049a5cf7f94c475;hp=6c7e09945f9f594ae81b0905a94dceeba7876b42;hpb=d3de2497bcaf8f6547b9ec14fc7e66d2b04ff97d;p=friendica.git diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 6c7e09945f..db7ad80ca6 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -41,7 +41,7 @@ class ContactSelector * @param boolean $disabled optional, default false * @return string */ - public static function pollInterval($current, $disabled = false) + public static function pollInterval(string $current, bool $disabled = false): string { $dis = (($disabled) ? ' disabled="disabled" ' : ''); $o = ''; @@ -84,7 +84,7 @@ class ContactSelector * @return string Server URL * @throws \Exception */ - private static function getServerURLForProfile($profile) + private static function getServerURLForProfile(string $profile): string { if (!empty(self::$server_url[$profile])) { return self::$server_url[$profile]; @@ -111,13 +111,16 @@ class ContactSelector } /** + * Determines network name + * * @param string $network network of the contact * @param string $profile optional, default empty * @param string $protocol (Optional) Protocol that is used for the transmission + * @param int $gsid Server id * @return string * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ - public static function networkToName($network, $profile = '', $protocol = '', $gsid = 0) + public static function networkToName(string $network, string $profile = '', string $protocol = '', int $gsid = null): string { $nets = [ Protocol::DFRN => DI::l10n()->t('DFRN'), @@ -179,12 +182,15 @@ class ContactSelector } /** + * Determines network's icon name + * * @param string $network network * @param string $profile optional, default empty - * @return string + * @param int $gsid Server id + * @return string Name for network icon * @throws \Exception */ - public static function networkToIcon($network, $profile = "", $gsid = 0) + public static function networkToIcon(string $network, string $profile = "", int $gsid = null): string { $nets = [ Protocol::DFRN => 'friendica',