以抽象形式调用时如何记录方法的用法?

How to document usage of a method when called in an abstract form?

在遗留项目中,当我尝试在 phpstorm 中查找方法的用法但没有成功时,我感到很困惑。

/**
 * @param SomeEntity[] $someEntity
 *
 * @return bool
 */
protected function warmupSomeEntity(array $brandUniverses)
{
     // I want to find this method's usage

}

进一步调试,我发现该方法是通过动态 class 方法调用以相当抽象的方式动态调用的:

/**
 * @param string $warmer
 * @param array $objects
 *
 * @throws RuntimeException
 */
public function warmupType($warmer, array $objects)
{
    $method = "warmup$warmer";
    if (method_exists($this, $
        $this->{$method}($objects);
    } else {
        throw new RuntimeException("There is no warmer '$warmer'");
    }
}

是否有 phpdoc 语法,我可以在其中记录 warmUpType 方法将调用 warmupSomeEntitywarmupSomeOtherEntity,以便在我想跳转到时可以再次找到它的用法再次调用代码块?

@uses keyword 正是我要找的东西:

Display a link to the documentation for an element, and create a backlink in the other element's documentation to this

PhpStorm支持,再次找到调用者

/**
 * @param string $warmer
 * @param array $objects
 * @uses warmupSomeEntity
 * @uses warmupSomeOtherEntity
 * @throws RuntimeException
 */
public function warmupType($warmer, array $objects)
{
 ...
}