Upgrade 1-11.38

This commit is contained in:
xesmyd
2026-03-30 14:10:30 +02:00
parent f2a7e6d1fc
commit ac648ef29d
24665 changed files with 69682 additions and 2205004 deletions
+4 -15
View File
@@ -25,10 +25,7 @@ class EmailValidator extends ConstraintValidator
{
private $isStrict;
/**
* @param bool $strict
*/
public function __construct($strict = false)
public function __construct(bool $strict = false)
{
$this->isStrict = $strict;
}
@@ -46,7 +43,7 @@ class EmailValidator extends ConstraintValidator
return;
}
if (!is_scalar($value) && !(is_object($value) && method_exists($value, '__toString'))) {
if (!is_scalar($value) && !(\is_object($value) && method_exists($value, '__toString'))) {
throw new UnexpectedTypeException($value, 'string');
}
@@ -111,24 +108,16 @@ class EmailValidator extends ConstraintValidator
/**
* Check DNS Records for MX type.
*
* @param string $host Host
*
* @return bool
*/
private function checkMX($host)
private function checkMX(string $host): bool
{
return '' !== $host && checkdnsrr($host, 'MX');
}
/**
* Check if one of MX, A or AAAA DNS RR exists.
*
* @param string $host Host
*
* @return bool
*/
private function checkHost($host)
private function checkHost(string $host): bool
{
return '' !== $host && ($this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA')));
}