Cleanup MailSo Validator

Cleanup removed features
This commit is contained in:
djmaze 2020-03-20 14:53:12 +01:00
parent 8fe8369b2a
commit 1009398d0c
15 changed files with 65 additions and 192 deletions

View file

@ -42,7 +42,7 @@ class Email
*/
private function __construct(string $sEmail, string $sDisplayName = '')
{
if (!\MailSo\Base\Validator::NotEmptyString($sEmail, true))
if (!strlen(\trim($sEmail)))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
}
@ -70,7 +70,7 @@ class Email
public static function Parse(string $sEmailAddress) : self
{
$sEmailAddress = \MailSo\Base\Utils::Trim($sEmailAddress);
if (!\MailSo\Base\Validator::NotEmptyString($sEmailAddress, true))
if (!strlen(\trim($sEmailAddress)))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
}

View file

@ -48,7 +48,7 @@ class EmailDep
*/
private function __construct(string $sEmail, string $sDisplayName = '', string $sRemark = '')
{
if (!\MailSo\Base\Validator::NotEmptyString($sEmail, true))
if (!strlen(\trim($sEmail)))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
}
@ -77,7 +77,7 @@ class EmailDep
public static function Parse(string $sEmailAddress) : \MailSo\Mime\Email
{
$sEmailAddress = \MailSo\Base\Utils::Trim($sEmailAddress);
if (!\MailSo\Base\Validator::NotEmptyString($sEmailAddress, true))
if (!strlen(\trim($sEmailAddress)))
{
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
}