mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Cleanup MailSo Validator
Cleanup removed features
This commit is contained in:
parent
8fe8369b2a
commit
1009398d0c
15 changed files with 65 additions and 192 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue