php代码注释里申明变量类型或给类增加方法注释

 
更多

php在代码的注释里申明变量类型。

/* @var $searchModel common\models\product\search\ProductArchiveSearch */

或者:

/* @var $searchModel \common\models\product\search\ProductArchiveSearch */

php在代码里给类增加方法注释。

/**
 * @method int sum(string $table, string $field, array $conditions = [])
 * @method int min(string $table, string $field, array $conditions = [])
 * @method int max(string $table, string $field, array $conditions = [])
 * @method float avg(string $table, string $field, array $conditions = [])
 */
class MySQL {......}
打赏

本文固定链接: https://www.cxy163.net/archives/2960 | 绝缘体

该日志由 绝缘体.. 于 2024年05月27日 发表在 未分类 分类下, 你可以发表评论,并在保留原文地址及作者的情况下引用到你的网站或博客。
原创文章转载请注明: php代码注释里申明变量类型或给类增加方法注释 | 绝缘体
关键字: , , , ,

php代码注释里申明变量类型或给类增加方法注释:等您坐沙发呢!

发表评论


快捷键:Ctrl+Enter