Code Duplication    Length = 3-3 lines in 2 locations

src/Parser/CommentStrategy/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();

src/Parser/CommentStrategy/LocalComment.php 1 location

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