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

@ -17,7 +17,7 @@ namespace MailSo\Mime;
*/
class ParameterCollection extends \MailSo\Base\Collection
{
protected function __construct(string $sRawParams = '')
function __construct(string $sRawParams = '')
{
parent::__construct();
@ -27,11 +27,6 @@ class ParameterCollection extends \MailSo\Base\Collection
}
}
public static function NewInstance(string $sRawParams = '') : self
{
return new self($sRawParams);
}
public function append($oParameter, bool $bToTop = false) : void
{
assert($oParameter instanceof Parameter);
@ -157,7 +152,7 @@ class ParameterCollection extends \MailSo\Base\Collection
$sCharset, \MailSo\Base\Enumerations\Charset::UTF_8);
}
$this->append(Parameter::NewInstance($sName, $sResult));
$this->append(new Parameter($sName, $sResult));
}
}
}