From: Michael Vogel Date: Sun, 6 Mar 2022 04:49:49 +0000 (+0100) Subject: Apply suggestions from code review X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=1ec1adf9048968c7aa9ae5450a979e6bd0e147c1;p=friendica.git Apply suggestions from code review Co-authored-by: Hypolite Petovan --- diff --git a/src/Protocol/Email.php b/src/Protocol/Email.php index 18af77b3fe..22d8aca235 100644 --- a/src/Protocol/Email.php +++ b/src/Protocol/Email.php @@ -41,7 +41,7 @@ class Email * @return Connection * @throws \Exception */ - public static function connect($mailbox, $username, $password) + public static function connect($mailbox, $username, $password): Connection { if (!function_exists('imap_open')) { return false; @@ -117,7 +117,7 @@ class Email * @param integer $uid user id * @return mixed */ - public static function messageMeta($mbox, $uid) + public static function messageMeta(Connection $mbox, $uid) { $ret = (($mbox && $uid) ? @imap_fetch_overview($mbox, $uid, FT_UID) : [[]]); // POSSIBLE CLEANUP --> array(array()) is probably redundant now return (count($ret)) ? $ret : []; @@ -218,7 +218,7 @@ class Email * @param string $subtype sub type * @return string */ - private static function messageGetPart($mbox, $uid, $p, $partno, $subtype) + private static function messageGetPart(Connection $mbox, $uid, $p, $partno, $subtype) { // $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple global $htmlmsg,$plainmsg,$charset,$attachments;