首页 > 解决方案 > 如何在 PHPDoc 中引用方法

问题描述

我使用基于 Lumen Laravel 的框架,它允许我创建这样的自定义方法:

/**there should be a proper doc*/
\Laravel\Lumen\Http\ResponseFactory::macro('customMethod', function ()
    {

        return $this;
    });

它创建customMethod称为方法的方法,该方法属于response()函数。

/**or probably there should be a proper doc*/
return response()->customMethod()

我想向我的 IDE(PhpStorm 2020.1.2)提示,它允许它查看从customMethod调用位置到声明位置的引用,并在 IDE 中单击函数名称来跟踪它。

标签: phpstormphpdoccode-documentation

解决方案


推荐阅读