Code Duplication    Length = 7-7 lines in 2 locations

EmailValidator/Parser/DomainPart.php 1 location

@@ 178-184 (lines=7) @@
175
                    $openedParenthesis--;
176
                }
177
            }
178
            if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
179
                if ($openedParenthesis === 0) {
180
                    throw new UnopenedComment();
181
                } else {
182
                    $openedParenthesis--;
183
                }
184
            }
185
186
            $this->checkConsecutiveDots();
187
            $this->checkDomainPartExceptions($prev);

EmailValidator/Parser/LocalPart.php 1 location

@@ 42-48 (lines=7) @@
39
                $openedParenthesis += $this->getOpenedParenthesis();
40
            }
41
42
            if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
43
                if ($openedParenthesis === 0) {
44
                    throw new UnopenedComment();
45
                }
46
47
                $openedParenthesis--;
48
            }
49
50
            $this->checkConsecutiveDots();
51