v1.2.0 - Immutable Variables
Changes
- Added support for creating immutable variables
- Added PHPStan integration
Extended Docs
If you want to create immutable variables, you can use the ->immutable()
method. If you try to assign a new value to an Immutable Variable, an Strictus\Exceptions\ImmutableStrictusException
exception will be thrown:
$immutableScore = Strictus::int(100)->immutable();
$immutableScore(50); //ImmutableStrictusException
$immutableScore->value = 50; //ImmutableStrictusException