| @@ 36-38 (lines=3) @@ | ||
| 33 | } |
|
| 34 | } |
|
| 35 | ||
| 36 | if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) { |
|
| 37 | return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); |
|
| 38 | } |
|
| 39 | ||
| 40 | $this->warnings[WarningComment::CODE] = new WarningComment(); |
|
| 41 | ||
| @@ 57-59 (lines=3) @@ | ||
| 54 | ||
| 55 | if($this->openedParenthesis >= 1) { |
|
| 56 | return new InvalidEmail(new UnclosedComment(), $this->lexer->token['value']); |
|
| 57 | } else if ($this->openedParenthesis < 0) { |
|
| 58 | return new InvalidEmail(new UnOpenedComment(), $this->lexer->token['value']); |
|
| 59 | } |
|
| 60 | ||
| 61 | $finalValidations = $this->commentStrategy->endOfLoopValidations($this->lexer); |
|
| 62 | ||
| @@ 113-115 (lines=3) @@ | ||
| 110 | ||
| 111 | private function checkInvalidTokensAfterAT() : Result |
|
| 112 | { |
|
| 113 | if ($this->lexer->token['type'] === EmailLexer::S_DOT) { |
|
| 114 | return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); |
|
| 115 | } |
|
| 116 | if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { |
|
| 117 | return new InvalidEmail(new ReasonDomainHyphened('After AT'), $this->lexer->token['value']); |
|
| 118 | } |
|
| @@ 116-118 (lines=3) @@ | ||
| 113 | if ($this->lexer->token['type'] === EmailLexer::S_DOT) { |
|
| 114 | return new InvalidEmail(new DotAtStart(), $this->lexer->token['value']); |
|
| 115 | } |
|
| 116 | if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN) { |
|
| 117 | return new InvalidEmail(new ReasonDomainHyphened('After AT'), $this->lexer->token['value']); |
|
| 118 | } |
|
| 119 | return new ValidEmail(); |
|
| 120 | } |
|
| 121 | ||
| @@ 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']); |
|