| @@ 29-31 (lines=3) @@ | ||
| 26 | } |
|
| 27 | } |
|
| 28 | ||
| 29 | if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { |
|
| 30 | return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); |
|
| 31 | } |
|
| 32 | ||
| 33 | $this->warnings[WarningComment::CODE] = new WarningComment(); |
|
| 34 | while (!$this->lexer->isNextToken(EmailLexer::S_AT)) {//!$this->lexer->isNextToken(EmailLexer::S_CLOSEPARENTHESIS)) { |
|
| @@ 47-49 (lines=3) @@ | ||
| 44 | ||
| 45 | if($this->MopenedParenthesis >= 1) { |
|
| 46 | return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); |
|
| 47 | } else if ($this->MopenedParenthesis < 0) { |
|
| 48 | return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); |
|
| 49 | } |
|
| 50 | ||
| 51 | if (!$this->lexer->isNextToken(EmailLexer::S_AT)) { |
|
| 52 | return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $this->lexer->token['value']); |
|
| @@ 27-29 (lines=3) @@ | ||
| 24 | ||
| 25 | $this->checkCRLFInFWS(); |
|
| 26 | ||
| 27 | if ($this->lexer->token['type'] === EmailLexer::S_CR) { |
|
| 28 | return new InvalidEmail(new CRNoLF(), $this->lexer->token['value']); |
|
| 29 | } |
|
| 30 | ||
| 31 | if ($this->lexer->isNextToken(EmailLexer::GENERIC) && $previous['type'] !== EmailLexer::S_AT) { |
|
| 32 | return new InvalidEmail(new AtextAfterCFWS(), $this->lexer->token['value']); |
|