Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing file doc comment?

I used drupal coder module to check my code and always get missing file doc as an error. I used the following file doc comment but still showing error. Can you please guide me what am i doing wrong. Edit:

 <?php

/**
 * @file
 * Description
 */


/**
 * Implements hook_menu().
 *
 * Description
 *
 * @return array An array of menu items
 */
function hook_menu() {
 //My code
}
like image 923
Versha Gupta Avatar asked Sep 08 '15 11:09

Versha Gupta


1 Answers

Typical first 15 lines of a file:

<?php

/**
 * @file
 * Description of what this module (or file) is doing.
 */

/**
 * Implements hook_help().
 */
function yourmodule_help($path, $arg) {
  // or any other hook...
}

Don't forget to also comment the first function of you file with /** or else coder will believe that your @file comment is your first function's comment.

like image 52
SebCorbin Avatar answered Sep 16 '22 13:09

SebCorbin