I use PHPDoc to enhance PhpStorm hinting. Normally, a method would have a PHPDoc like this:
/**
* @param array|callable $a
* @param int $b
* @return mixed
*/
public function x($a, $b) {
// …
}
I need to describe the same inside a @method tag. PhpStorm (or PHPDoc) doesn't like the vertical bar. If I take it out with one of the types – everything looks good.
/**
* @method mixed x(array|callable $a, int $b)
*/
class A {
// …
}
First, is this a legal syntax for @method tag and the problem is with PhpStorm? If not, is there a way to describe arguments in full inside @method? Thanks!