Conditions | 4 |
Paths | 4 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 4 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
25 | 6 | public static function isAbsolutePath(string $path) : bool |
|
26 | { |
||
27 | // path already absolute? |
||
28 | 6 | if (substr($path, 0, 1) === '/') { |
|
29 | 1 | return true; |
|
30 | } |
||
31 | 5 | if (self::isStream($path)) { |
|
32 | 1 | return true; |
|
33 | } |
||
34 | 4 | if (self::isAbsoluteWindowsPath($path)) { |
|
35 | 2 | return true; |
|
36 | } |
||
37 | 2 | return false; |
|
38 | } |
||
71 |