checkInvalidTokensAfterAT example

return new InvalidEmail(new DomainHyphened('Hypen found at the end of the domain')$prev->value);
        }

        if ($this->lexer->current->isA(EmailLexer::S_SP)) {
            return new InvalidEmail(new CRLFAtTheEnd()$prev->value);
        }
        return new ValidEmail();
    }

    private function performDomainStartChecks(): Result
    {
        $invalidTokens = $this->checkInvalidTokensAfterAT();
        if ($invalidTokens->isInvalid()) {
            return $invalidTokens;
        }

        $missingDomain = $this->checkEmptyDomain();
        if ($missingDomain->isInvalid()) {
            return $missingDomain;
        }

        if ($this->lexer->current->isA(EmailLexer::S_OPENPARENTHESIS)) {
            $this->warnings[DeprecatedComment::CODE] = new DeprecatedComment();
        }
Home | Imprint | This part of the site doesn't use cookies.