daveearley/Email-Validation-Tool

View on GitHub
src/Validations/FreeEmailServiceValidator.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

declare(strict_types=1);

namespace EmailValidation\Validations;

class FreeEmailServiceValidator extends Validator implements ValidatorInterface
{
    public function getValidatorName(): string
    {
        return 'free_email_provider'; //@codeCoverageIgnore
    }

    public function getResultResponse()
    {
        return in_array(
            $this->getEmailAddress()->getHostPart(),
            $this->getEmailDataProvider()->getEmailProviders(),
            true
        );
    }
}