Code Duplication    Length = 9-9 lines in 2 locations

EmailValidator/Parser/LocalPart.php 1 location

@@ 49-57 (lines=9) @@
46
                }
47
            }
48
49
            if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || 
50
                $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) {
51
                $commentsResult = $this->parseComments();
52
53
                //Invalid comment parsing
54
                if($commentsResult->isInvalid()) {
55
                    return $commentsResult;
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']);

EmailValidator/Parser/DomainPart.php 1 location

@@ 138-146 (lines=9) @@
135
                return $notAllowedChars;
136
            }
137
138
            if ($this->lexer->token['type'] === EmailLexer::S_OPENPARENTHESIS || 
139
                $this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS ) {
140
                $commentsResult = $this->parseComments();
141
142
                //Invalid comment parsing
143
                if($commentsResult->isInvalid()) {
144
                    return $commentsResult;
145
                }
146
            }
147
148
            $this->checkConsecutiveDots();
149
            $result = $this->checkDomainPartExceptions($prev);