From bbdcd756f3d19a3ea4904909cb7130a5c2aab1b1 Mon Sep 17 00:00:00 2001 From: Dave Earley Date: Wed, 3 Jun 2020 22:35:12 +0100 Subject: [PATCH] fix property type --- index.php | 2 +- src/Validations/Validator.php | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/index.php b/index.php index 88cbeb1..54d4748 100644 --- a/index.php +++ b/index.php @@ -4,7 +4,7 @@ require __DIR__ . '/vendor/autoload.php'; -$validator = EmailValidatorFactory::create($_REQUEST['email'] ?: ''); +$validator = EmailValidatorFactory::create($_REQUEST['email'] ?? ''); header('Content-Type: application/json'); echo $validator->getValidationResults()->asJson(); diff --git a/src/Validations/Validator.php b/src/Validations/Validator.php index 080a036..6db3511 100644 --- a/src/Validations/Validator.php +++ b/src/Validations/Validator.php @@ -5,14 +5,13 @@ namespace EmailValidation\Validations; use EmailValidation\EmailAddress; -use EmailValidation\EmailDataProvider; use EmailValidation\EmailDataProviderInterface; abstract class Validator { private ?EmailAddress $emailAddress; - private ?EmailDataProvider $emailDataProvider; + private ?EmailDataProviderInterface $emailDataProvider; public function __construct(EmailAddress $emailAddress = null, EmailDataProviderInterface $emailDataProvider = null) {