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
Copy file name to clipboardExpand all lines: README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,9 +33,11 @@ This package provides the following rules for use with [`phpstan/phpstan`](https
33
33
34
34
### `ImmutableObjectRule`
35
35
36
-
This rule reports an error when a class tagged as immutable is mutable. This can be used for example to ensure that value objects are always immutable.
36
+
This rule reports an error when a class or class property tagged as immutable is mutable. This can be used for example to ensure that value objects are always immutable.
37
37
38
-
:bulb: Classes can be tagged as immutable by adding the annotation `@psalm-immutable` or `@immutable` to the class phpdoc.
38
+
:bulb: Classes or properties can be tagged as immutable by adding the annotation `@psalm-immutable` or `@immutable` to the phpdoc.
39
+
40
+
:bulb: The immutability rule also asserts that immutable properties are not mutated in child classes
0 commit comments