Move empty condition in return statement
This commit is contained in:
parent
a090ef855a
commit
4fcb24bacb
@ -138,11 +138,7 @@ class EmailValidator extends ConstraintValidator
|
|||||||
*/
|
*/
|
||||||
private function checkMX($host)
|
private function checkMX($host)
|
||||||
{
|
{
|
||||||
if ('' === $host) {
|
return ('' !== $host) && checkdnsrr($host, 'MX');
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return checkdnsrr($host, 'MX');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -154,10 +150,6 @@ class EmailValidator extends ConstraintValidator
|
|||||||
*/
|
*/
|
||||||
private function checkHost($host)
|
private function checkHost($host)
|
||||||
{
|
{
|
||||||
if ('' === $host) {
|
return ('' !== $host) && ($this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA')));
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->checkMX($host) || (checkdnsrr($host, 'A') || checkdnsrr($host, 'AAAA'));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user