mirror of
https://github.com/friendica/friendica
synced 2024-12-23 07:20:15 +00:00
Apply suggestions from code review
Co-authored-by: Hypolite Petovan <hypolite@mrpetovan.com>
This commit is contained in:
parent
421dd028ce
commit
1ec1adf904
1 changed files with 3 additions and 3 deletions
|
@ -41,7 +41,7 @@ class Email
|
||||||
* @return Connection
|
* @return Connection
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public static function connect($mailbox, $username, $password)
|
public static function connect($mailbox, $username, $password): Connection
|
||||||
{
|
{
|
||||||
if (!function_exists('imap_open')) {
|
if (!function_exists('imap_open')) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -117,7 +117,7 @@ class Email
|
||||||
* @param integer $uid user id
|
* @param integer $uid user id
|
||||||
* @return mixed
|
* @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
|
$ret = (($mbox && $uid) ? @imap_fetch_overview($mbox, $uid, FT_UID) : [[]]); // POSSIBLE CLEANUP --> array(array()) is probably redundant now
|
||||||
return (count($ret)) ? $ret : [];
|
return (count($ret)) ? $ret : [];
|
||||||
|
@ -218,7 +218,7 @@ class Email
|
||||||
* @param string $subtype sub type
|
* @param string $subtype sub type
|
||||||
* @return string
|
* @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
|
// $partno = '1', '2', '2.1', '2.1.3', etc for multipart, 0 if simple
|
||||||
global $htmlmsg,$plainmsg,$charset,$attachments;
|
global $htmlmsg,$plainmsg,$charset,$attachments;
|
||||||
|
|
Loading…
Reference in a new issue