function FoldingWhiteSpace::checkCRLFInFWS
1 call to FoldingWhiteSpace::checkCRLFInFWS()
- FoldingWhiteSpace::parse in vendor/
egulias/ email-validator/ src/ Parser/ FoldingWhiteSpace.php
File
-
vendor/
egulias/ email-validator/ src/ Parser/ FoldingWhiteSpace.php, line 61
Class
Namespace
Egulias\EmailValidator\ParserCode
protected function checkCRLFInFWS() : Result {
if (!$this->lexer->current
->isA(EmailLexer::CRLF)) {
return new ValidEmail();
}
if (!$this->lexer
->isNextTokenAny(array(
EmailLexer::S_SP,
EmailLexer::S_HTAB,
))) {
return new InvalidEmail(new CRLFX2(), $this->lexer->current->value);
}
//this has no coverage. Condition is repeated from above one
if (!$this->lexer
->isNextTokenAny(array(
EmailLexer::S_SP,
EmailLexer::S_HTAB,
))) {
return new InvalidEmail(new CRLFAtTheEnd(), $this->lexer->current->value);
}
return new ValidEmail();
}