You are here

function coder_upgrade_add_install_file_comment in Coder 7.2

Same name and namespace in other branches
  1. 7 coder_upgrade/conversions/install.inc \coder_upgrade_add_install_file_comment()
1 call to coder_upgrade_add_install_file_comment()
coder_upgrade_convert_install_file_comment in coder_upgrade/conversions/install.inc
Adds a Doxygen style comment to install files.

File

coder_upgrade/conversions/install.inc, line 97
Provides conversion routines applied to install files.

Code

function coder_upgrade_add_install_file_comment(&$reader, $position) {
  cdp("inside " . __FUNCTION__);
  global $_coder_upgrade_module_name;
  $statements =& $reader
    ->getStatements();

  // Insert a blank line.
  $whitespace = array(
    'type' => T_WHITESPACE,
    'value' => 1,
  );
  $statements
    ->insertElement($position, $whitespace);

  // Insert file document comment.
  $comment = array(
    'type' => T_DOC_COMMENT,
    'value' => "/**\n * @file\n * Install, update and uninstall functions for the {$_coder_upgrade_module_name} module.\n *\n */",
  );
  $statements
    ->insertElement($position, $comment);
}