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

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