Total Complexity | 9 |
Total Lines | 55 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
9 | class Util |
||
10 | { |
||
11 | /** |
||
12 | * Generate UUID by version. |
||
13 | * |
||
14 | * @param int $version UUID Version |
||
15 | * @param string|\Ramsey\Uuid\UuidInterface $ns The UUID namespace in which to create the named UUID |
||
16 | * @param string $name The name to create a UUID for |
||
17 | * |
||
18 | * @throws \Ramsey\Uuid\Exception\UnsatisfiedDependencyException |
||
19 | * |
||
20 | * @return \Ramsey\Uuid\UuidInterface UUID |
||
21 | */ |
||
22 | 5 | public static function generateUuid(int $version = 4, $ns = null, string $name = null): UuidInterface |
|
44 | } |
||
45 | |||
46 | /** |
||
47 | * Validate UUID plus version. |
||
48 | * |
||
49 | * @param string $str |
||
50 | * @param int|null $version UUID Version |
||
51 | * |
||
52 | * @return bool True for valid. |
||
53 | */ |
||
54 | 1 | public static function validateUuid(string $str, int $version = null) |
|
67 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.