Code Duplication    Length = 3-5 lines in 5 locations

EmailValidator/Parser/LocalPart.php 2 locations

@@ 47-51 (lines=5) @@
44
45
            $this->checkConsecutiveDots();
46
47
            if ($this->lexer->token['type'] === EmailLexer::S_DOT &&
48
                $this->lexer->isNextToken(EmailLexer::S_AT)
49
            ) {
50
                throw new DotAtEnd();
51
            }
52
53
            $this->warnEscaping();
54
            $this->isInvalidToken($this->lexer->token, $closingQuote);
@@ 97-99 (lines=3) @@
94
                $this->warnings[CFWSWithFWS::CODE] = new CFWSWithFWS();
95
                $setSpecialsWarning = false;
96
            }
97
            if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH && $this->lexer->isNextToken(EmailLexer::S_DQUOTE)) {
98
                $this->lexer->moveNext();
99
            }
100
101
            $this->lexer->moveNext();
102

EmailValidator/Parser/Parser.php 1 location

@@ 140-142 (lines=3) @@
137
138
    protected function checkConsecutiveDots()
139
    {
140
        if ($this->lexer->token['type'] === EmailLexer::S_DOT && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
141
            throw new ConsecutiveDot();
142
        }
143
    }
144
145
    /**

EmailValidator/Parser/DomainPart.php 2 locations

@@ 356-358 (lines=3) @@
353
            throw new ExpectingATEXT();
354
        }
355
356
        if ($this->lexer->token['type'] === EmailLexer::S_HYPHEN && $this->lexer->isNextToken(EmailLexer::S_DOT)) {
357
            throw new DomainHyphened();
358
        }
359
360
        if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH
361
            && $this->lexer->isNextToken(EmailLexer::GENERIC)) {
@@ 360-363 (lines=4) @@
357
            throw new DomainHyphened();
358
        }
359
360
        if ($this->lexer->token['type'] === EmailLexer::S_BACKSLASH
361
            && $this->lexer->isNextToken(EmailLexer::GENERIC)) {
362
            throw new ExpectingATEXT();
363
        }
364
    }
365
366
    /**