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:
Marco Pivetta
2019-12-27 17:32:32 +01:00
committed by Ben Ramsey
parent c935fbb0d9
commit d01922dd14
2 changed files with 14 additions and 0 deletions
+2
View File
@@ -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
{