Skip to content

MIR1208

MixedPropertyAssignment

A mixed value is assigned to a property, hiding its concrete type.

<?php
class C { public int $n; }
/** @param mixed $x */ function f(C $o,$x){ $o->n = $x; }

Narrow the value to the property’s type before assigning.