|
@@ 61-63 (lines=3) @@
|
| 58 |
|
if(!$validQuotedString->isValid()) return $validQuotedString; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
if (!$this->lexer->isNextToken(EmailLexer::S_AT) && $prev['type'] !== EmailLexer::S_BACKSLASH) { |
| 62 |
|
return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']); |
| 63 |
|
} |
| 64 |
|
|
| 65 |
|
return new ValidEmail(); |
| 66 |
|
} |
|
@@ 72-75 (lines=4) @@
|
| 69 |
|
{ |
| 70 |
|
$previous = $this->lexer->getPrevious(); |
| 71 |
|
|
| 72 |
|
if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] === EmailLexer::GENERIC) { |
| 73 |
|
$description = 'https://tools.ietf.org/html/rfc5322#section-3.2.4 - quoted string should be a unit'; |
| 74 |
|
return new InvalidEmail(new ExpectingATEXT($description), $this->lexer->token['value']); |
| 75 |
|
} |
| 76 |
|
|
| 77 |
|
try { |
| 78 |
|
$this->lexer->find(EmailLexer::S_DQUOTE); |