Ver*_*pta 6 drupal codesniffer
我使用了drupal 编码器模块来检查我的代码,并总是因为缺少文件而丢失文件doc。我使用了以下文件doc注释,但仍显示错误。你能指导我我在做什么错。 编辑:
<?php
/**
* @file
* Description
*/
/**
* Implements hook_menu().
*
* Description
*
* @return array An array of menu items
*/
function hook_menu() {
//My code
}
Run Code Online (Sandbox Code Playgroud)
文件的通常前15行:
<?php
/**
* @file
* Description of what this module (or file) is doing.
*/
/**
* Implements hook_help().
*/
function yourmodule_help($path, $arg) {
// or any other hook...
}
Run Code Online (Sandbox Code Playgroud)
别忘了还用/ **注释文件的第一个函数,否则编码人员会相信@file注释就是第一个函数的注释。