覆盖PHPDoc中的返回类型

kor*_*ral 6 phpdoc

我有一个Abc方法类(正文并不重要):

/**
 * @return SomeBaseClass
 */
function getAll() { ... }
Run Code Online (Sandbox Code Playgroud)

Abc被调用的子类中,AbcChild我想重新定义返回类的类型,以便在Netbeans中正确地看到它.我可以不重新定义方法吗?

/**
 * @return SomeClass
 */
function getAll() { return parent::getAll(); }
Run Code Online (Sandbox Code Playgroud)

Lon*_*ren 8

尝试这样的事情:

/**
 * @method SomeClass getAll()
 */
class AbcChild
{
 // ....
}
Run Code Online (Sandbox Code Playgroud)

更多信息 @method