You are here

protected function Parser::checkCRLFInFWS in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php \Egulias\EmailValidator\Parser\Parser::checkCRLFInFWS()
1 call to Parser::checkCRLFInFWS()
Parser::parseFWS in vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php

File

vendor/egulias/email-validator/src/Egulias/EmailValidator/Parser/Parser.php, line 178

Class

Parser

Namespace

Egulias\EmailValidator\Parser

Code

protected function checkCRLFInFWS() {
  if ($this->lexer->token['type'] !== EmailLexer::CRLF) {
    return;
  }
  if ($this->lexer
    ->isNextToken(EmailLexer::CRLF)) {
    throw new \InvalidArgumentException("ERR_FWS_CRLF_X2");
  }
  if (!$this->lexer
    ->isNextTokenAny(array(
    EmailLexer::S_SP,
    EmailLexer::S_HTAB,
  ))) {
    throw new \InvalidArgumentException("ERR_FWS_CRLF_END");
  }
}