PhpStorm 2019.3 Help

Code Inspection: Parameter type

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

See Type declarations (php.net) and @param (phpdoc.org) 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: 27 February 2020