Remove useless NewInstance

Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
djmaze 2020-05-08 11:49:18 +02:00
parent 82e560bc53
commit 693e0f4c10
61 changed files with 802 additions and 1345 deletions

View file

@ -32,7 +32,7 @@ class Attachment
*/
private $oBodyStructure;
private function __construct()
function __construct()
{
$this->Clear();
}
@ -148,14 +148,9 @@ class Attachment
return $this->oBodyStructure ? $this->oBodyStructure->IsPgpSignature() : false;
}
public static function NewInstance() : self
{
return new self();
}
public static function NewBodyStructureInstance(string $sFolder, int $iUid, \MailSo\Imap\BodyStructure $oBodyStructure) : self
{
return self::NewInstance()->InitByBodyStructure($sFolder, $iUid, $oBodyStructure);
return (new self)->InitByBodyStructure($sFolder, $iUid, $oBodyStructure);
}
public function InitByBodyStructure(string $sFolder, int $iUid, \MailSo\Imap\BodyStructure $oBodyStructure) : self