phpstorm - 如何在 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 中单击函数名称来跟踪它。
解决方案
推荐阅读
- android - Android 设计支持库无法编译
- ios - 如何在没有任何 Apple Store 帐户的情况下在 Macbook Simulator 上运行 iOS 应用程序?
- javascript - 什么是 Salesforce 开发
- android - 在功能性 Espresso 测试中模拟 Firebase 消息
- razor - 想要在 ASP.NET Core 2.1 中为 ViewComponent 创建一个单元测试
- c++ - 为什么主函数没有传入参数?
- javascript - 如何使用 Jquery、Ajax 发送 SOAP 标头并从服务器获取响应
- php - 如果使用方法 GET,如何加密 URL 参数
- python - 如何使用matplotlib在python中绘制一个完美光滑的球体?
- django - 如何在 DRF 中添加嵌套关系的平均值