SpoofEmail example



    /** * @psalm-suppress InvalidArgument */
    public function isValid(string $email, EmailLexer $emailLexer) : bool
    {
        $checker = new Spoofchecker();
        $checker->setChecks(Spoofchecker::SINGLE_SCRIPT);

        if ($checker->isSuspicious($email)) {
            $this->error = new SpoofEmail();
        }

        return $this->error === null;
    }

    /** * @return InvalidEmail */
    public function getError() : ?InvalidEmail
    {
        return $this->error;
    }
Home | Imprint | This part of the site doesn't use cookies.