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

@ -42,7 +42,7 @@ class Logger extends \MailSo\Base\Collection
*/
private $bHideErrorNotices;
protected function __construct(bool $bRegPhpErrorHandler = true)
function __construct(bool $bRegPhpErrorHandler = true)
{
parent::__construct();
@ -60,11 +60,6 @@ class Logger extends \MailSo\Base\Collection
\register_shutdown_function(array(&$this, '__loggerShutDown'));
}
public static function NewInstance(bool $bRegPhpErrorHandler = false) : self
{
return new self($bRegPhpErrorHandler);
}
/**
* @staticvar \MailSo\Log\Logger $oInstance;
*/
@ -73,7 +68,7 @@ class Logger extends \MailSo\Base\Collection
static $oInstance = null;
if (null === $oInstance)
{
$oInstance = self::NewInstance();
$oInstance = new self;
}
return $oInstance;