You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure that other parts of your codebase respect the immutability of these classes. Any modifications that are attempted should either return a new instance or throw an error.
The text was updated successfully, but these errors were encountered:
Final class: The class is marked as final, which prevents inheritance. This means that no one can extend the class and modify its behavior or internal state.
Private properties: All properties are declared private, so they cannot be directly modified from outside the class.
Use of readonly: The use of the readonly keyword in PHP 8.2 for the Ksuid class ensures that its properties can only be assigned during initialization (in the constructor) and cannot be modified afterward.
State mutation-free methods: None of the methods in the class modify the properties after they are defined. All methods simply return values calculated based on the existing state of the instance.
Ensure that other parts of your codebase respect the immutability of these classes. Any modifications that are attempted should either return a new instance or throw an error.
The text was updated successfully, but these errors were encountered: