mirror of
https://github.com/egulias/EmailValidator.git
synced 2026-08-30 20:18:04 +00:00
Nullable type declaration for default null value (#328)
Adds ? before type declarations for parameters with a default null value
This commit is contained in:
@@ -60,7 +60,7 @@ class DNSCheckValidation implements EmailValidation
|
||||
*/
|
||||
private $dnsGetRecord;
|
||||
|
||||
public function __construct(DNSGetRecordWrapper $dnsGetRecord = null)
|
||||
public function __construct(?DNSGetRecordWrapper $dnsGetRecord = null)
|
||||
{
|
||||
if (!function_exists('idn_to_ascii')) {
|
||||
throw new \LogicException(sprintf('The %s class requires the Intl extension.', __CLASS__));
|
||||
|
||||
@@ -9,7 +9,7 @@ class EmptyValidationList extends \InvalidArgumentException
|
||||
/**
|
||||
* @param int $code
|
||||
*/
|
||||
public function __construct($code = 0, Exception $previous = null)
|
||||
public function __construct($code = 0, ?Exception $previous = null)
|
||||
{
|
||||
parent::__construct("Empty validation list is not allowed", $code, $previous);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user