Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 306 Bytes

MixedPropertyTypeCoercion.md

File metadata and controls

16 lines (12 loc) · 306 Bytes

MixedPropertyTypeCoercion

Emitted when Psalm cannot be sure that part of an array/iterable argument's type constraints can be fulfilled

<?php

class A {
    /** @var string[] */
    public $takesStringArray = [];
}

function foo(A $a, array $arr) : void {
    $a->takesStringArray = $arr;
}