| Total Complexity | 9 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | final class UuidHelper |
||
| 15 | { |
||
| 16 | public static function toUuid(string $blobString): string |
||
| 36 | ; |
||
| 37 | } |
||
| 38 | |||
| 39 | public static function isValidUuid(string $uuidString): bool |
||
| 40 | { |
||
| 41 | return (bool) preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', $uuidString); |
||
| 42 | } |
||
| 43 | |||
| 44 | public static function isValidHexUuid(string $uuidString): bool |
||
| 45 | { |
||
| 46 | return (bool) preg_match('/^[0-9a-f]{32}$/i', $uuidString); |
||
| 47 | } |
||
| 48 | |||
| 49 | public static function uuidToBlob(string $uuidString): string |
||
| 56 | } |
||
| 57 | } |
||
| 58 |