simplified if return
Simplify if control structures that return the boolean result of their condition.
This commit is contained in:
parent
a4d87ad5bd
commit
0747b8ca05
|
|
@ -4105,12 +4105,12 @@ class PHPMailer
|
|||
//Is it a valid IPv4 address?
|
||||
return filter_var($host, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false;
|
||||
}
|
||||
if (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false) {
|
||||
return (bool) (filter_var('http://' . $host, FILTER_VALIDATE_URL) !== false)
|
||||
//Is it a syntactically valid hostname?
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return false;
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue