Code Duplication    Length = 3-3 lines in 3 locations

src/Parser/DoubleQuote.php 1 location

@@ 49-51 (lines=3) @@
46
47
            $this->lexer->moveNext();
48
49
            if (!$this->escaped() && isset($invalid[$this->lexer->token['type']])) {
50
                return new InvalidEmail(new ExpectingATEXT("Expecting ATEXT between DQUOTE"), $this->lexer->token['value']);
51
            }
52
        }
53
54
        $prev = $this->lexer->getPrevious();

src/Parser/LocalPart.php 1 location

@@ 76-78 (lines=3) @@
73
                return $resultEscaping;
74
            }
75
76
            if (isset($this->invalidTokens[$this->lexer->token['type']])) {
77
                return new InvalidEmail(new ExpectingATEXT('Invalid token found'), $this->lexer->token['value']);
78
            }
79
80
            $resultFWS = $this->parseLocalFWS();
81
            if($resultFWS->isInvalid()) {

src/Parser/DomainPart.php 1 location

@@ 280-282 (lines=3) @@
277
            return new InvalidEmail(new ExpectingATEXT('Escaping following "ATOM"'), $this->lexer->token['value']);
278
        }
279
280
        if (!isset($validDomainTokens[$this->lexer->token['type']])) {
281
            return new InvalidEmail(new ExpectingATEXT('Invalid token in domain: ' . $this->lexer->token['value']), $this->lexer->token['value']);
282
        }
283
284
        return new ValidEmail();
285
    }