Drupal 缺少文件文档注释?
我使用drupal模块检查我的代码,并始终将丢失的文件文档作为错误获取。 我使用了下面的文件文档注释,但仍然显示错误。你能告诉我我做错了什么吗。 编辑:Drupal 缺少文件文档注释?,drupal,codesniffer,Drupal,Codesniffer,我使用drupal模块检查我的代码,并始终将丢失的文件文档作为错误获取。 我使用了下面的文件文档注释,但仍然显示错误。你能告诉我我做错了什么吗。 编辑: <?php /** * @file * Description */ /** * Implements hook_menu(). * * Description * * @return array An array of menu items */ function hook_menu() { //My cod
<?php
/**
* @file
* Description
*/
/**
* Implements hook_menu().
*
* Description
*
* @return array An array of menu items
*/
function hook_menu() {
//My code
}
文件的典型前15行:
<?php
/**
* @file
* Description of what this module (or file) is doing.
*/
/**
* Implements hook_help().
*/
function yourmodule_help($path, $arg) {
// or any other hook...
}
您是否尝试将php版本添加到您的文件中,它看起来像/*PHP5*/您能给我举个例子吗?我检查了drupal标准模块,还有一个文件注释缺失的问题。这个问题可能是codesniffer的问题?我读了一篇添加了PHP版本5的博客,但仍然收到了这个问题,我没有这样做的权限。请检查下面我的文件代码: