Conditions | 6 |
Paths | 6 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 6 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
26 | 10 | public static function isAbsolute($file) |
|
27 | { |
||
28 | 10 | return strspn($file, '/\\', 0, 1) |
|
29 | 8 | || (strlen($file) > 3 && ctype_alpha($file[0]) |
|
30 | 8 | && substr($file, 1, 1) === ':' |
|
31 | 8 | && strspn($file, '/\\', 2, 1) |
|
32 | 2 | ) |
|
33 | 8 | || null !== parse_url($file, PHP_URL_SCHEME) |
|
34 | 10 | ; |
|
35 | } |
||
36 | } |
||
37 |