Mark v3() and v5() as pure

This commit is contained in:
Valentin Udaltsov
2020-04-13 22:22:22 +03:00
committed by GitHub
parent b3c3920875
commit 388bdab9bc
+6
View File
@@ -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
{