Code Duplication    Length = 7-7 lines in 2 locations

EmailValidator/Parser/LocalPart.php 1 location

@@ 37-43 (lines=7) @@
34
                $this->parseComments();
35
                $openedParenthesis += $this->getOpenedParenthesis();
36
            }
37
            if ($this->lexer->token['type'] === EmailLexer::S_CLOSEPARENTHESIS) {
38
                if ($openedParenthesis === 0) {
39
                    throw new UnopenedComment();
40
                } else {
41
                    $openedParenthesis--;
42
                }
43
            }
44
45
            $this->checkConsecutiveDots();
46

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);