mirror of
https://github.com/composer/composer
synced 2025-05-10 00:53:06 +00:00
CS fixes
This commit is contained in:
parent
d0aa51fc52
commit
1dd8bffce5
5 changed files with 32 additions and 2 deletions
|
@ -490,8 +490,16 @@ EOT
|
|||
|
||||
protected function isValidEmail($email)
|
||||
{
|
||||
if (!function_exists('filter_var')) return true; // Bypass if we can't validate it
|
||||
if (version_compare(PHP_VERSION, '5.3.3', '<')) return true; // ?
|
||||
// assume it's valid if we can't validate it
|
||||
if (!function_exists('filter_var')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// php <5.3.3 has a very broken email validator, so bypass checks
|
||||
if (version_compare(PHP_VERSION, '5.3.3', '<')) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false !== filter_var($email, FILTER_VALIDATE_EMAIL);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue