mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37: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
|
|
@ -50,7 +50,7 @@ class Folder
|
|||
/**
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
private function __construct(\MailSo\Imap\Folder $oImapFolder, bool $bSubscribed = true, bool $bExisten = true)
|
||||
function __construct(\MailSo\Imap\Folder $oImapFolder, bool $bSubscribed = true, bool $bExisten = true)
|
||||
{
|
||||
$this->oImapFolder = $oImapFolder;
|
||||
$this->oSubFolders = null;
|
||||
|
|
@ -69,22 +69,14 @@ class Folder
|
|||
$this->bExisten = $bExisten;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
public static function NewInstance(\MailSo\Imap\Folder $oImapFolder, bool $bSubscribed = true, bool $bExisten = true) : self
|
||||
{
|
||||
return new self($oImapFolder, $bSubscribed, $bExisten);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
* @throws \MailSo\Base\Exceptions\InvalidArgumentException
|
||||
*/
|
||||
public static function NewNonExistenInstance(string $sFullNameRaw, string $sDelimiter) : self
|
||||
{
|
||||
return self::NewInstance(
|
||||
\MailSo\Imap\Folder::NewInstance($sFullNameRaw, $sDelimiter, array('\NoSelect')), true, false);
|
||||
return new self(
|
||||
new \MailSo\Imap\Folder($sFullNameRaw, $sDelimiter, array('\NoSelect')), true, false);
|
||||
}
|
||||
|
||||
public function Name() : string
|
||||
|
|
@ -142,7 +134,7 @@ class Folder
|
|||
{
|
||||
if ($bCreateIfNull && !$this->oSubFolders)
|
||||
{
|
||||
$this->oSubFolders = FolderCollection::NewInstance();
|
||||
$this->oSubFolders = new FolderCollection;
|
||||
}
|
||||
|
||||
return $this->oSubFolders;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue