From 6186aac792f6e0e120de8934986d693a22f774fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roland=20H=C3=A4der?= Date: Thu, 30 Jun 2022 14:58:36 +0200 Subject: [PATCH] Fixed type-hints --- src/Content/Smilies.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Content/Smilies.php b/src/Content/Smilies.php index 4a36e0911e..43289a710a 100644 --- a/src/Content/Smilies.php +++ b/src/Content/Smilies.php @@ -243,22 +243,24 @@ class Smilies } /** - * @param string $m string + * Encodes smiley match array to BASE64 string * + * @param array $m Match array * @return string base64 encoded string */ - private static function encode(string $m): string + private static function encode(array $m): string { return '<' . $m[1] . '>' . Strings::base64UrlEncode($m[2]) . ''; } /** - * @param string $m string + * Decodes a previously BASE64-encoded match array to a string * + * @param array $m Matches array * @return string base64 decoded string * @throws \Exception */ - private static function decode(string $m): string + private static function decode(array $m): string { return '<' . $m[1] . '>' . Strings::base64UrlDecode($m[2]) . ''; } @@ -268,9 +270,7 @@ class Smilies * expand <3333 to the correct number of hearts * * @param string $x string - * * @return string HTML Output - * * @throws \Friendica\Network\HTTPException\InternalServerErrorException */ private static function pregHeart(string $x): string