Code Duplication    Length = 3-4 lines in 3 locations

EmailValidator/Parser/LocalPart.php 1 location

@@ 25-27 (lines=3) @@
22
        $openedParenthesis = 0;
23
24
        while ($this->lexer->token['type'] !== EmailLexer::S_AT && null !== $this->lexer->token['type']) {
25
            if ($this->lexer->token['type'] === EmailLexer::S_DOT && null === $this->lexer->getPrevious()['type']) {
26
                throw new DotAtStart();
27
            }
28
29
            $closingQuote = $this->checkDQUOTE($closingQuote);
30
            if ($closingQuote && $parseDQuote) {

EmailValidator/Parser/Parser.php 2 locations

@@ 51-54 (lines=4) @@
48
     */
49
    protected function validateQuotedPair()
50
    {
51
        if (!($this->lexer->token['type'] === EmailLexer::INVALID
52
            || $this->lexer->token['type'] === EmailLexer::C_DEL)) {
53
            throw new ExpectingQPair();
54
        }
55
56
        $this->warnings[QuotedPart::CODE] =
57
            new QuotedPart($this->lexer->getPrevious()['type'], $this->lexer->token['type']);
@@ 107-109 (lines=3) @@
104
            throw new AtextAfterCFWS();
105
        }
106
107
        if ($this->lexer->token['type'] === EmailLexer::S_LF || $this->lexer->token['type'] === EmailLexer::C_NUL) {
108
            throw new ExpectingCTEXT();
109
        }
110
111
        if ($this->lexer->isNextToken(EmailLexer::S_AT) || $previous['type']  === EmailLexer::S_AT) {
112
            $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();