mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 23:17:02 +03:00
Remove useless NewInstance
Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
parent
82e560bc53
commit
693e0f4c10
61 changed files with 802 additions and 1345 deletions
|
|
@ -27,17 +27,12 @@ class FetchResponse
|
|||
*/
|
||||
private $aEnvelopeCache;
|
||||
|
||||
private function __construct(Response $oImapResponse)
|
||||
function __construct(Response $oImapResponse)
|
||||
{
|
||||
$this->oImapResponse = $oImapResponse;
|
||||
$this->aEnvelopeCache = null;
|
||||
}
|
||||
|
||||
public static function NewInstance(Response $oImapResponse) : self
|
||||
{
|
||||
return new self($oImapResponse);
|
||||
}
|
||||
|
||||
public function GetEnvelope(bool $bForce = false) : ?array
|
||||
{
|
||||
if (null === $this->aEnvelopeCache || $bForce)
|
||||
|
|
@ -61,7 +56,7 @@ class FetchResponse
|
|||
$aEmails = $this->GetFetchEnvelopeValue($iIndex);
|
||||
if (is_array($aEmails) && 0 < count($aEmails))
|
||||
{
|
||||
$oResult = \MailSo\Mime\EmailCollection::NewInstance();
|
||||
$oResult = new \MailSo\Mime\EmailCollection;
|
||||
foreach ($aEmails as $aEmailItem)
|
||||
{
|
||||
if (is_array($aEmailItem) && 4 === count($aEmailItem))
|
||||
|
|
@ -78,7 +73,7 @@ class FetchResponse
|
|||
if (0 < strlen($sLocalPart) && 0 < strlen($sDomainPart))
|
||||
{
|
||||
$oResult->append(
|
||||
\MailSo\Mime\Email::NewInstance($sLocalPart.'@'.$sDomainPart, $sDisplayName)
|
||||
new \MailSo\Mime\Email($sLocalPart.'@'.$sDomainPart, $sDisplayName)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue