Nullable type declaration for default null value (#328)

Adds ? before type declarations for parameters with a default null value
This commit is contained in:
Mathias Reker ⚡️
2022-07-13 16:53:11 +02:00
committed by GitHub
parent 18b9e5b572
commit 413b263617
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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);
}