From 388bdab9bc8221d41f8566ffff718a31a3b3f9cd Mon Sep 17 00:00:00 2001 From: Valentin Udaltsov Date: Mon, 13 Apr 2020 22:22:22 +0300 Subject: [PATCH] Mark v3() and v5() as pure --- src/functions.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/functions.php b/src/functions.php index 7b29ec4..9670132 100644 --- a/src/functions.php +++ b/src/functions.php @@ -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 {