PhpStorm 2020.3 Help

Code Inspection: Parameter type

Reports the parameters passed to a function call, whose types do not match the ones specified in the function definition via type declaration or the PHPDoc @param tag.

See Type declarations ( and @param ( for details.

In the following example, the expectArray function has the parameter of the array type but is called with a string argument.

/** * @param array $arr * @return array */ function expectArray(array $arr) { return $arr; } expectArray("Foo");
Last modified: 08 December 2020