Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[DependencyInjection] Cleaned up formatting of complex isAbsolutePath…
…() logic.
  • Loading branch information
kriswallsmith authored and fabpot committed Apr 17, 2010
1 parent 2ed59a8 commit 4569ca0
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions src/Symfony/Components/DependencyInjection/Loader/FileLoader.php
Expand Up @@ -77,16 +77,24 @@ protected function getAbsolutePath($file, $currentPath = null)

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;
)
;
}
}

0 comments on commit 4569ca0

Please sign in to comment.