mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-15 16:07:55 +03:00
Mark v3() and v5() as pure
This commit is contained in:
committed by
GitHub
parent
b3c3920875
commit
388bdab9bc
@@ -70,6 +70,9 @@ function v2(
|
||||
* @param string|UuidInterface $ns The namespace (must be a valid UUID)
|
||||
*
|
||||
* @return string Version 3 UUID as a string
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
*/
|
||||
function v3($ns, string $name): string
|
||||
{
|
||||
@@ -93,6 +96,9 @@ function v4(): string
|
||||
* @param string|UuidInterface $ns The namespace (must be a valid UUID)
|
||||
*
|
||||
* @return string Version 5 UUID as a string
|
||||
*
|
||||
* @psalm-pure note: changing the internal factory is an edge case not covered by purity invariants,
|
||||
* but under constant factory setups, this method operates in functionally pure manners
|
||||
*/
|
||||
function v5($ns, string $name): string
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user