Marking Uuid::uuid3() as pure as well: it produces same values for same input

This commit is contained in:
Marco Pivetta
2020-03-23 10:01:43 +01:00
parent e830b23d77
commit c8e8b7b693
2 changed files with 12 additions and 0 deletions
@@ -90,6 +90,15 @@ final class UuidIsImmutable
];
}
/** @psalm-pure */
public static function uuid3IsPure(): UuidInterface
{
return Uuid::uuid3(
Uuid::fromString('ff6f8cb0-c57d-11e1-9b21-0800200c9a66'),
'Look ma! I am a pure function!'
);
}
/** @psalm-pure */
public static function uuid5IsPure(): UuidInterface
{