src/Parser/LocalPart.php 1 location
|
@@ 42-50 (lines=9) @@
|
39 |
|
} |
40 |
|
} |
41 |
|
|
42 |
|
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || |
43 |
|
$this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { |
44 |
|
$commentsResult = $this->parseComments(); |
45 |
|
|
46 |
|
//Invalid comment parsing |
47 |
|
if($commentsResult->isInvalid()) { |
48 |
|
return $commentsResult; |
49 |
|
} |
50 |
|
} |
51 |
|
|
52 |
|
if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) { |
53 |
|
return new InvalidEmail(new ConsecutiveDot(), $this->lexer->token['value']); |
src/Parser/DomainPart.php 1 location
|
@@ 158-167 (lines=10) @@
|
155 |
|
return $notAllowedChars; |
156 |
|
} |
157 |
|
|
158 |
|
if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || |
159 |
|
$this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) { |
160 |
|
$hasComments = true; |
161 |
|
$commentsResult = $this->parseComments(); |
162 |
|
|
163 |
|
//Invalid comment parsing |
164 |
|
if($commentsResult->isInvalid()) { |
165 |
|
return $commentsResult; |
166 |
|
} |
167 |
|
} |
168 |
|
|
169 |
|
$dotsResult = $this->checkConsecutiveDots(); |
170 |
|
if ($dotsResult->isInvalid()) { |