mirror of
https://github.com/ramsey/uuid.git
synced 2026-06-26 17:46:38 +03:00
Marked minimal parts of UuidInterface and Uuid named constructors as pure/immutable
This change is the minimum requirement to make the static analysis suite pass checks on immutability/purity invariants of a `Uuid` and `UuidInterface`: it doesn't ensure that internals of `Uuid` are pure. That will need deprecation of `Uuid::setFactory()`, as well as marking any types referenced in private state as `@psalm-immutable` too. That's out of scope for the current patch, which provides a good 80/20 split on purity invariants for most (even advanced) UUID downstream users.
This commit is contained in:
committed by
Ben Ramsey
parent
c935fbb0d9
commit
d01922dd14
@@ -22,6 +22,8 @@ use Serializable;
|
||||
/**
|
||||
* A UUID is a universally unique identifier adhering to an agreed-upon
|
||||
* representation format and standard for generation
|
||||
*
|
||||
* @psalm-immutable
|
||||
*/
|
||||
interface UuidInterface extends JsonSerializable, Serializable
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user