[DependencyInjection] Cleaned up formatting of complex isAbsolutePath() logic.
This commit is contained in:
parent
2ed59a8464
commit
4569ca033c
|
@ -77,16 +77,24 @@ abstract class FileLoader extends Loader
|
|||
|
||||
static protected function isAbsolutePath($file)
|
||||
{
|
||||
if ($file[0] == '/' || $file[0] == '\\' ||
|
||||
(strlen($file) > 3 && ctype_alpha($file[0]) &&
|
||||
$file[1] == ':' &&
|
||||
($file[2] == '\\' || $file[2] == '/')
|
||||
return
|
||||
'/' == $file[0]
|
||||
||
|
||||
'\\' == $file[0]
|
||||
||
|
||||
(
|
||||
3 < strlen($file)
|
||||
&&
|
||||
ctype_alpha($file[0])
|
||||
&&
|
||||
':' == $file[1]
|
||||
&&
|
||||
(
|
||||
'\\' == $file[2]
|
||||
||
|
||||
'/' == $file[2]
|
||||
)
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
Reference in New Issue