mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 15:37:03 +03:00
Code refactoring
This commit is contained in:
parent
f817a680a2
commit
d8c9f7ec14
15 changed files with 469 additions and 189 deletions
|
|
@ -58,9 +58,11 @@ class Email
|
|||
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
|
||||
}
|
||||
|
||||
$this->sEmail = \MailSo\Base\Utils::IdnToAscii(\trim($sEmail), true);
|
||||
$this->sDisplayName = \trim($sDisplayName);
|
||||
$this->sRemark = \trim($sRemark);
|
||||
$this->sEmail = \MailSo\Base\Utils::IdnToAscii(
|
||||
\MailSo\Base\Utils::Trim($sEmail), true);
|
||||
|
||||
$this->sDisplayName = \MailSo\Base\Utils::Trim($sDisplayName);
|
||||
$this->sRemark = \MailSo\Base\Utils::Trim($sRemark);
|
||||
|
||||
$this->sDkimStatus = \MailSo\Mime\Enumerations\DkimStatus::NONE;
|
||||
$this->sDkimValue = '';
|
||||
|
|
@ -88,6 +90,7 @@ class Email
|
|||
*/
|
||||
public static function Parse($sEmailAddress)
|
||||
{
|
||||
$sEmailAddress = \MailSo\Base\Utils::Trim($sEmailAddress);
|
||||
if (!\MailSo\Base\Validator::NotEmptyString($sEmailAddress, true))
|
||||
{
|
||||
throw new \MailSo\Base\Exceptions\InvalidArgumentException();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue