MIR0234
PossiblyInvalidPropertyAssignmentValue
Only some types of a value assigned to a property match the property’s type.
Example
Section titled “Example”<?phpclass Counter { public int $n = 0;
public function set(int|string $value): void { $this->n = $value; }}How to fix
Section titled “How to fix”Narrow the value to the property’s type before assigning, or widen the property type.
