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

@ -37,7 +37,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
*/
public $__USE_INITIAL_AUTH_PLAIN_COMMAND;
protected function __construct()
function __construct()
{
parent::__construct();
@ -49,11 +49,6 @@ class ManageSieveClient extends \MailSo\Net\NetClient
$this->__USE_INITIAL_AUTH_PLAIN_COMMAND = true;
}
public static function NewInstance() : self
{
return new self();
}
public function IsSupported(string $sCapa) : bool
{
return isset($this->aCapa[\strtoupper($sCapa)]);
@ -119,7 +114,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
if (!strlen(\trim($sLogin)) || !strlen(\trim($sPassword)))
{
$this->writeLogException(
new \MailSo\Base\Exceptions\InvalidArgumentException(),
new \MailSo\Base\Exceptions\InvalidArgumentException,
\MailSo\Log\Enumerations\Type::ERROR, true);
}
@ -175,14 +170,14 @@ class ManageSieveClient extends \MailSo\Net\NetClient
if (!$bAuth)
{
$this->writeLogException(
new \MailSo\Sieve\Exceptions\LoginBadMethodException(),
new \MailSo\Sieve\Exceptions\LoginBadMethodException,
\MailSo\Log\Enumerations\Type::ERROR, true);
}
}
else
{
$this->writeLogException(
new \MailSo\Sieve\Exceptions\LoginException(),
new \MailSo\Sieve\Exceptions\LoginException,
\MailSo\Log\Enumerations\Type::ERROR, true);
}
@ -430,7 +425,7 @@ class ManageSieveClient extends \MailSo\Net\NetClient
if (!strlen(\trim($sRequest)))
{
$this->writeLogException(
new \MailSo\Base\Exceptions\InvalidArgumentException(),
new \MailSo\Base\Exceptions\InvalidArgumentException,
\MailSo\Log\Enumerations\Type::ERROR, true);
}