PhpStorm
 
Get PhpStorm
You are viewing the documentation for an earlier version of PhpStorm.

Code Inspection: Parameter type

Last modified: 16 May 2022

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 (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.