Total Complexity | 3 |
Total Lines | 21 |
Duplicated Lines | 0 % |
Coverage | 85.71% |
Changes | 0 |
1 | <?php |
||
16 | class Url |
||
17 | { |
||
18 | /** |
||
19 | * Tests if a string is an URL. |
||
20 | */ |
||
21 | 1 | public static function isUrl(string $url): bool |
|
22 | { |
||
23 | 1 | return (bool) preg_match('~^(?:f|ht)tps?://~i', $url); |
|
24 | } |
||
25 | |||
26 | /** |
||
27 | * Tests if a remote file exists. |
||
28 | */ |
||
29 | 1 | public static function isRemoteFileExists(string $remoteFile): bool |
|
37 | } |
||
38 | } |
||
39 |