Skip to content

MIR0226

PropertyTypeCoercion

A value assigned to a property had to be coerced to the property’s declared type.

<?php
class C { public Child $c; }
/** @param Parent $p */ function f(C $o,$p){ $o->c = $p; }

Assign a value of the exact declared type.