function DomainComment::endOfLoopValidations
Overrides CommentStrategy::endOfLoopValidations
File
-
vendor/
egulias/ email-validator/ src/ Parser/ CommentStrategy/ DomainComment.php, line 18
Class
Namespace
Egulias\EmailValidator\Parser\CommentStrategyCode
public function endOfLoopValidations(EmailLexer $lexer) : Result {
//test for end of string
if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->current->value);
}
//add warning
//Address is valid within the message but cannot be used unmodified for the envelope
return new ValidEmail();
}