Phpstorm - phpDoc inspection - how to force parameter type declaration?

1.1k Views Asked by At

I would like to inspect in PhpStorm if method phpDoc has declared type for each parameter, eg:

/**
* @param @value
**/
public function someMethod($value)....

Would be invalid as @param $value is missing type, valid example:

/**
* @param string @value
**/
public function someMethod($value)
1

There are 1 best solutions below

0
On

You can use PHP Code sniffer in phpstorm (install).

And If you use symfony framework you can use Symfony2 standard

If not you can use one rule what actually what you want MissingParamComment