public function getModelForEmail($email)
    {
        $emailTemplates = $this->getEmailTemplates();

        foreach ($emailTemplates as $emailTemplate) {
            $emailRule = new Email($emailTemplate);

            if ($emailRule->check($email)) {
                return $this->bannedEmailsRepository->findByEmail($emailTemplate);
            }
        }

        return null;
    }
public function getModelForEmail($email)
    {
        $emailTemplates = $this->getEmailTemplates();

        foreach ($emailTemplates as $emailTemplate) {
            $emailRule = new Email($emailTemplate);

            if ($emailRule->check($email)) {
                return $this->bannedEmailsRepository->findByEmail($emailTemplate);
            }
        }

        return null;
    }
public function getModelForEmail ( $ email ) { $ emailTemplates = $ this -> getEmailTemplates ( ) ; foreach ( $ emailTemplates as $ emailTemplate ) { $ emailRule = new Email ( $ emailTemplate ) ; if ( $ emailRule -> check ( $ email ) ) { return $ this -> bannedEmailsRepository -> findByEmail ( $ emailTemplate ) ; } } return null ; }
Returns the model for the given email.

@param string $email
@return BannedEmail | null
Returns the model for the given email .