Code Duplication    Length = 3-3 lines in 2 locations

EmailValidator/Parser/DomainComment.php 1 location

@@ 25-27 (lines=3) @@
22
    public function endOfLoopValidations(EmailLexer $lexer) : Result
23
    {
24
        //test for end of string
25
        if (!$lexer->isNextToken(EmailLexer::S_DOT)) {
26
            return new InvalidEmail(new ExpectingATEXT('DOT not found near CLOSEPARENTHESIS'), $lexer->token['value']);
27
        }
28
            //add warning
29
            //Address is valid within the message but cannot be used unmodified for the envelope
30
        return new ValidEmail();

EmailValidator/Parser/LocalComment.php 1 location

@@ 23-25 (lines=3) @@
20
21
    public function endOfLoopValidations(EmailLexer $lexer) : Result
22
    {
23
        if (!$lexer->isNextToken(EmailLexer::S_AT)) {
24
            return new InvalidEmail(new ExpectingATEXT('ATEX is not expected after closing comments'), $lexer->token['value']);
25
        }
26
        $this->warnings[CFWSNearAt::CODE] = new CFWSNearAt();
27
        return new ValidEmail();
28
    }