| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class UserDataValidator |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * Checks if the given string is a valid username. |
||
| 11 | */ |
||
| 12 | public static function isValidUsername(string $username): bool |
||
| 13 | { |
||
| 14 | return preg_match('#[\W]+#', $username) !== 1; |
||
| 15 | } |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Checks if the given string is a valid UUID. |
||
| 19 | */ |
||
| 20 | public static function isValidUuid(string $uuid): bool |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Check if is an email address has invalid characters. |
||
| 27 | */ |
||
| 28 | public static function isValidEmail(string $email): bool |
||
| 33 |