[Filesystem] Simplified an if statement

This commit is contained in:
Stepan Anchugov 2015-05-06 17:32:23 +05:00 committed by Fabien Potencier
parent cbcdb16bee
commit 4d974ced7f
1 changed files with 2 additions and 6 deletions

View File

@ -423,17 +423,13 @@ class Filesystem
*/
public function isAbsolutePath($file)
{
if (strspn($file, '/\\', 0, 1)
return (strspn($file, '/\\', 0, 1)
|| (strlen($file) > 3 && ctype_alpha($file[0])
&& substr($file, 1, 1) === ':'
&& (strspn($file, '/\\', 2, 1))
)
|| null !== parse_url($file, PHP_URL_SCHEME)
) {
return true;
}
return false;
);
}
/**