You are here

function coder_upgrade_convert_update_N in Coder 7

Same name in this branch
  1. 7 coder_upgrade/conversions/other.inc \coder_upgrade_convert_update_N()
  2. 7 coder_upgrade/conversions/function.inc \coder_upgrade_convert_update_N()
Same name and namespace in other branches
  1. 7.2 coder_upgrade/conversions/other.inc \coder_upgrade_convert_update_N()
  2. 7.2 coder_upgrade/conversions/function.inc \coder_upgrade_convert_update_N()

Updates hook_update_N().

Check hook_update_N for a Doxygen style comment.

Parameters

PGPNode $node: A node object containing a PGPClass (or function) item.

2 calls to coder_upgrade_convert_update_N()
coder_upgrade_callback_functions in coder_upgrade/conversions/other.inc
Callback routine for function changes using grammar parser.
coder_upgrade_upgrade_hook_update_N_alter in coder_upgrade/conversions/function.inc
Implements hook_upgrade_hook_update_N_alter().

File

coder_upgrade/conversions/other.inc, line 1331
Other conversion routine file for the coder_upgrade module.

Code

function coder_upgrade_convert_update_N(&$node) {
  cdp("inside " . __FUNCTION__);
  $item =& $node->data;

  //  cdp($item->print_r());
  $comment =& $item->comment;
  if (!is_array($comment) || empty($comment)) {
    $comment = array(
      'type' => T_DOC_COMMENT,
      'value' => "/**\n * @todo Please insert a Doxygen style comment for this hook_update_N.\n *\n */",
    );
  }
  elseif ($comment['type'] != T_DOC_COMMENT) {
    $comment = array(
      'type' => T_DOC_COMMENT,
      'value' => "/**\n * @todo Please insert a Doxygen style comment for this hook_update_N.\n *\n *" . $comment['value'] . "\n */",
    );
  }
}