Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class Util |
||
9 | { |
||
10 | /** |
||
11 | * @param string $input |
||
12 | * |
||
13 | * @return string |
||
14 | */ |
||
15 | public static function toCamelCase(string $input): string |
||
16 | { |
||
17 | return str_replace(' ', '', ucwords(str_replace(['.', '_', '-'], ' ', $input))); |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * Validates if supplied URL is valid and not an IP address. |
||
22 | * |
||
23 | * @param string $url |
||
24 | * |
||
25 | * @return bool |
||
26 | */ |
||
27 | public static function isValidUrl(string $url): bool |
||
37 | } |
||
38 | |||
39 | /** |
||
40 | * @param string $url |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | public static function cleanUrl(string $url): string |
||
49 |