Closed svnldwg closed 3 years ago
Ensure that protected or public properties annotated as immutable are not mutated in a child class.
The following example should lead to an error:
/** * @immutable */ class ImmutableClass { protected $value; } class ChildClassThatMutatesParent extends ImmutableClass { public function setValue($value) { $this->value = $value; } }
Ensure that protected or public properties annotated as immutable are not mutated in a child class.
The following example should lead to an error: