Search code examples
phpphpstormphpdocphpdocumentor2

PhpStorm 7 @method bug or I'm wrongly using phpDocumentor annotations?


I don't know if this is my bad (wrong phpDocumentor annotations) or it's a bug. Anyone experiencing this issue?

namespace Bar\Baz;

/**
 * @method Foo baz(boolean $baz)
 */
class Foo
{

}

As you can see there is no code completion for chaining (i.e. $f->baz()->baz()) and boolean type is namespaced:

Problem 1 Problem 2


Solution

  • This is a known issue in PhpStorm 7.x.

    If you use the fully qualified name chaining and type hinting will work.

    Reference: http://youtrack.jetbrains.com/issue/WI-17404