| @@ 35-37 (lines=3) @@ | ||
| 32 | return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->token['value']); |
|
| 33 | } |
|
| 34 | ||
| 35 | if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) { |
|
| 36 | return new InvalidEmail(new ExpectingCTEXT(), $this->lexer->token['value']); |
|
| 37 | } |
|
| 38 | ||
| 39 | if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type'] === EmailLexer::S_AT) { |
|
| 40 | $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt(); |
|
| @@ 59-61 (lines=3) @@ | ||
| 56 | } |
|
| 57 | } |
|
| 58 | ||
| 59 | if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { |
|
| 60 | return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); |
|
| 61 | } |
|
| 62 | ||
| 63 | if ($this->lexer->token['type'] === EmailLexer::S_DOT && |
|
| 64 | $this->lexer->isNextToken(EmailLexer::S_AT) |
|
| @@ 63-67 (lines=5) @@ | ||
| 60 | return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); |
|
| 61 | } |
|
| 62 | ||
| 63 | if ($this->lexer->token['type'] === EmailLexer::S_DOT && |
|
| 64 | $this->lexer->isNextToken(EmailLexer::S_AT) |
|
| 65 | ) { |
|
| 66 | return new InvalidEmail(new DotAtEnd(), $this->lexer->token['value']); |
|
| 67 | } |
|
| 68 | ||
| 69 | $resultEscaping = $this->validateEscaping(); |
|
| 70 | if ($resultEscaping->isInvalid()) { |
|
| @@ 230-232 (lines=3) @@ | ||
| 227 | throw new ExpectingATEXT(); |
|
| 228 | } |
|
| 229 | ||
| 230 | if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) { |
|
| 231 | return new InvalidEmail(new ReasonDomainHyphened('Hypen found near DOT'), $this->lexer->token['value']); |
|
| 232 | } |
|
| 233 | ||
| 234 | if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH |
|
| 235 | && $this->lexer->isNextToken(EmailLexer::GENERIC)) { |
|