Projects with this topic
Sort by:
-
Immutably clone (copy) objects and override their properties. Works for readonly classes and properties as well.
Updated -
A PHPStan rule, which checks all classes implementing (or interfaces extending) Eboreum\ImmutableInterface\ImmutableInterface (available in the eboreum/immutable-interface package) for adherence to immutability.
Updated -
Implement Eboreum\ImmutableInterface\ImmutableInterface on any class to flag it as being immutable. An immutable object must never change its state; i.e. its class properties must remain unchanged after instantiation or cloning.
Updated -