为常量编写PHPDocs的正确方法是什么? [英] What is the correct way to write PHPDocs for constants?

查看:94
本文介绍了为常量编写PHPDocs的正确方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有此代码:

/**
 * Days to parse
 * @var int
 */
const DAYS_TO_PARSE = 10;
...

我认为使用@var对于常量不是正确的,并且看不到任何@constant PHPDoc标记.正确的方法是什么?

I don't think that using @var is correct for a constant and I don't see any @constant PHPDoc tag. What is the correct way to do this?

推荐答案

要将它们放入phpDoc,请使用:

To get them into phpDoc, use:

@const THING

常用构造:

@const[ant] label [description]

这篇关于为常量编写PHPDocs的正确方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆