Conditions | 3 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
28 | 7 | public function is_local() : bool |
|
29 | { |
||
30 | 7 | $host = parse_url($this->file, PHP_URL_HOST); |
|
31 | |||
32 | // If it has not an url host and it is a file_id |
||
33 | 7 | if ($host === null && !is_numeric($this->file)) { |
|
34 | // Then it is a local path |
||
35 | 3 | return true; |
|
36 | } else { |
||
37 | 4 | return false; |
|
38 | } |
||
39 | } |
||
40 | |||
66 |