Skip to content

Commit

Permalink
fix property type
Browse files Browse the repository at this point in the history
  • Loading branch information
daveearley committed Jun 3, 2020
1 parent 6fbc67e commit bbdcd75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
3 changes: 1 addition & 2 deletions src/Validations/Validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit bbdcd75

Please sign in to comment.