mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-28 19:19:31 +00:00
Refactor of domain exceptions
This commit is contained in:
@@ -314,7 +314,7 @@ class EmailParser
|
||||
}
|
||||
|
||||
$this->checkConsecutiveDots();
|
||||
$this->checkDomainPartExceptions();
|
||||
$this->checkDomainPartExceptions($prev);
|
||||
|
||||
if ($this->hasBrackets()) {
|
||||
$this->parseDomainLiteral();
|
||||
@@ -490,7 +490,7 @@ class EmailParser
|
||||
return true;
|
||||
}
|
||||
|
||||
private function checkDomainPartExceptions()
|
||||
private function checkDomainPartExceptions($prev)
|
||||
{
|
||||
if ($this->lexer->token['type'] === EmailLexer::S_AT) {
|
||||
throw new \InvalidArgumentException('ERR_CONSECUTIVEATS');
|
||||
|
||||
Reference in New Issue
Block a user