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

@ -39,7 +39,7 @@ class Identity
*/
private $bSignatureInsertBefore;
protected function __construct(string $sId = '', string $sEmail = '')
function __construct(string $sId = '', string $sEmail = '')
{
$this->sId = empty($sId) ? '' : $sId;
$this->sEmail = empty($sEmail) ? '' : $sEmail;
@ -50,16 +50,6 @@ class Identity
$this->bSignatureInsertBefore = false;
}
public static function NewInstance() : self
{
return new self();
}
public static function NewInstanceFromAccount(\RainLoop\Model\Account $oAccount) : self
{
return new self('', $oAccount->Email());
}
public function Id(bool $bFillOnEmpty = false) : string
{
return $bFillOnEmpty ? ('' === $this->sId ? '---' : $this->sId) : $this->sId;