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
If a class has a property of type object which is declared immutable and accessible from outside (public or via getter), the object itself must be immutable as well.
Example:
/** @var immutable */class Immutable
{
publicCat$cat;
}
class Cat {
publicint$lala; // not allowed here, Cat must be immutable
}
The text was updated successfully, but these errors were encountered:
svnldwg
changed the title
Immutable object properties
Immutable object properties must be immutable objects
Oct 28, 2020
If a class has a property of type object which is declared immutable and accessible from outside (public or via getter), the object itself must be immutable as well.
Example:
The text was updated successfully, but these errors were encountered: