- Patch #516254 by drewish remove @return PHPDocs where nothing is to return.

merge-requests/26/head
Dries Buytaert 2009-07-11 13:56:22 +00:00
parent e8b82e0ba4
commit 5fbaa4b83c
5 changed files with 2 additions and 87 deletions

View File

@ -34,8 +34,6 @@ function hook_locale($op = 'groups') {
* Nested array of links keyed by language code. * Nested array of links keyed by language code.
* @param $path * @param $path
* The current path. * The current path.
* @return
* None.
*/ */
function hook_translation_link_alter(array &$links, $path) { function hook_translation_link_alter(array &$links, $path) {
global $language; global $language;

View File

@ -105,8 +105,6 @@ function hook_menu() {
* *
* @param $items * @param $items
* Associative array of menu router definitions returned from hook_menu(). * Associative array of menu router definitions returned from hook_menu().
* @return
* None.
*/ */
function hook_menu_alter(&$items) { function hook_menu_alter(&$items) {
// Example - disable the page at node/add // Example - disable the page at node/add
@ -118,8 +116,6 @@ function hook_menu_alter(&$items) {
* *
* @param $item * @param $item
* Associative array defining a menu link as passed into menu_link_save(). * Associative array defining a menu link as passed into menu_link_save().
* @return
* None.
*/ */
function hook_menu_link_alter(&$item) { function hook_menu_link_alter(&$item) {
// Example 1 - make all new admin links hidden (a.k.a disabled). // Example 1 - make all new admin links hidden (a.k.a disabled).
@ -144,8 +140,6 @@ function hook_menu_link_alter(&$item) {
* Associative array defining a menu link after _menu_link_translate() * Associative array defining a menu link after _menu_link_translate()
* @param $map * @param $map
* Associative array containing the menu $map (path parts and/or objects). * Associative array containing the menu $map (path parts and/or objects).
* @return
* None.
*/ */
function hook_translated_menu_link_alter(&$item, $map) { function hook_translated_menu_link_alter(&$item, $map) {
if ($item['href'] == 'devel/cache/clear') { if ($item['href'] == 'devel/cache/clear') {

View File

@ -266,8 +266,6 @@ function hook_node_operations() {
* *
* @param $node * @param $node
* The node that is being deleted. * The node that is being deleted.
* @return
* None.
*/ */
function hook_node_delete($node) { function hook_node_delete($node) {
db_delete('mytable') db_delete('mytable')
@ -282,8 +280,6 @@ function hook_node_delete($node) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_delete_revision($node) { function hook_node_delete_revision($node) {
db_delete('upload')->condition('vid', $node->vid)->execute(); db_delete('upload')->condition('vid', $node->vid)->execute();
@ -302,8 +298,6 @@ function hook_node_delete_revision($node) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_insert($node) { function hook_node_insert($node) {
db_insert('mytable') db_insert('mytable')
@ -352,8 +346,6 @@ function hook_node_load($nodes, $types) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_prepare($node) { function hook_node_prepare($node) {
if (!isset($node->comment)) { if (!isset($node->comment)) {
@ -369,8 +361,6 @@ function hook_node_prepare($node) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_prepare_translation($node) { function hook_node_prepare_translation($node) {
} }
@ -397,8 +387,6 @@ function hook_node_search_result($node) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_presave($node) { function hook_node_presave($node) {
if ($node->nid && $node->moderate) { if ($node->nid && $node->moderate) {
@ -414,8 +402,6 @@ function hook_node_presave($node) {
* *
* @param $node * @param $node
* The node the action is being performed on. * The node the action is being performed on.
* @return
* None.
*/ */
function hook_node_update($node) { function hook_node_update($node) {
db_update('mytable') db_update('mytable')
@ -454,8 +440,6 @@ function hook_node_update_index($node) {
* The node the action is being performed on. * The node the action is being performed on.
* @param $form * @param $form
* The $form parameter from node_validate(). * The $form parameter from node_validate().
* @return
* None.
*/ */
function hook_node_validate($node, $form) { function hook_node_validate($node, $form) {
if (isset($node->end) && isset($node->start)) { if (isset($node->end) && isset($node->start)) {
@ -594,8 +578,6 @@ function hook_node_info() {
* - "update" * - "update"
* @param $info * @param $info
* The node type object on which $op is being performed. * The node type object on which $op is being performed.
* @return
* None.
*/ */
function hook_node_type($op, $info) { function hook_node_type($op, $info) {
@ -670,8 +652,6 @@ function hook_access($op, $node, $account) {
* *
* @param $node * @param $node
* The node being deleted. * The node being deleted.
* @return
* None.
* *
* To take action when nodes of any type are deleted (not just nodes of * To take action when nodes of any type are deleted (not just nodes of
* the type defined by this module), use hook_node() instead. * the type defined by this module), use hook_node() instead.
@ -690,8 +670,6 @@ function hook_delete($node) {
* *
* @param $node * @param $node
* The node being saved. * The node being saved.
* @return
* None.
* *
* For a usage example, see image.module. * For a usage example, see image.module.
*/ */
@ -779,8 +757,6 @@ function hook_form($node, $form_state) {
* *
* @param $node * @param $node
* The node being inserted. * The node being inserted.
* @return
* None.
* *
* To take action when nodes of any type are inserted (not just nodes of * To take action when nodes of any type are inserted (not just nodes of
* the type(s) defined by this module), use hook_node() instead. * the type(s) defined by this module), use hook_node() instead.
@ -823,8 +799,6 @@ function hook_load($nodes) {
* *
* @param $node * @param $node
* The node being updated. * The node being updated.
* @return
* None.
* *
* To take action when nodes of any type are updated (not just nodes of * To take action when nodes of any type are updated (not just nodes of
* the type(s) defined by this module), use hook_node() instead. * the type(s) defined by this module), use hook_node() instead.
@ -847,8 +821,6 @@ function hook_update($node) {
* The node to be validated. * The node to be validated.
* @param $form * @param $form
* The node edit form array. * The node edit form array.
* @return
* None.
* *
* To validate nodes of all types (not just nodes of the type(s) defined by * To validate nodes of all types (not just nodes of the type(s) defined by
* this module), use hook_node() instead. * this module), use hook_node() instead.

View File

@ -15,10 +15,6 @@
* A test group has started. * A test group has started.
* *
* This hook is called just once at the beginning of a test group. * This hook is called just once at the beginning of a test group.
*
* @return
* None.
*
*/ */
function hook_test_group_started() { function hook_test_group_started() {
} }
@ -27,10 +23,6 @@ function hook_test_group_started() {
* A test group has finished. * A test group has finished.
* *
* This hook is called just once at the end of a test group. * This hook is called just once at the end of a test group.
*
* @return
* None.
*
*/ */
function hook_test_group_finished() { function hook_test_group_finished() {
} }
@ -43,9 +35,6 @@ function hook_test_group_finished() {
* @param * @param
* $results The results of the test as gathered by DrupalWebTestCase. * $results The results of the test as gathered by DrupalWebTestCase.
* *
* @return
* None.
*
* @see DrupalWebTestCase->results * @see DrupalWebTestCase->results
*/ */
function hook_test_finished($results) { function hook_test_finished($results) {

View File

@ -21,9 +21,6 @@
* Database maintenance, recalculation of settings or parameters, and * Database maintenance, recalculation of settings or parameters, and
* automatic mailings are good candidates for cron tasks. * automatic mailings are good candidates for cron tasks.
* *
* @return
* None.
*
* This hook will only be called if cron.php is run (e.g. by crontab). * This hook will only be called if cron.php is run (e.g. by crontab).
*/ */
function hook_cron() { function hook_cron() {
@ -137,8 +134,6 @@ function hook_elements() {
* Modules may use this to react appropriately; for example, nothing should * Modules may use this to react appropriately; for example, nothing should
* be output in this case, because PHP will then throw a "headers cannot be * be output in this case, because PHP will then throw a "headers cannot be
* modified" error when attempting the redirection. * modified" error when attempting the redirection.
* @return
* None.
*/ */
function hook_exit($destination = NULL) { function hook_exit($destination = NULL) {
db_update('counter') db_update('counter')
@ -387,8 +382,6 @@ function hook_form_alter(&$form, $form_state, $form_id) {
* Nested array of form elements that comprise the form. * Nested array of form elements that comprise the form.
* @param $form_state * @param $form_state
* A keyed array containing the current state of the form. * A keyed array containing the current state of the form.
* @return
* None.
* *
* @see drupal_prepare_form(). * @see drupal_prepare_form().
*/ */
@ -447,9 +440,6 @@ function hook_forms($form_id, $args) {
* Only use this hook if your code must run even for cached page views.This hook * Only use this hook if your code must run even for cached page views.This hook
* is called before modules or most include files are loaded into memory. * is called before modules or most include files are loaded into memory.
* It happens while Drupal is still in bootstrap mode. * It happens while Drupal is still in bootstrap mode.
*
* @return
* None.
*/ */
function hook_boot() { function hook_boot() {
// we need user_access() in the shutdown function. make sure it gets loaded // we need user_access() in the shutdown function. make sure it gets loaded
@ -467,9 +457,6 @@ function hook_boot() {
* For example, this hook is a typical place for modules to add CSS or JS * For example, this hook is a typical place for modules to add CSS or JS
* that should be present on every page. This hook is not run on cached * that should be present on every page. This hook is not run on cached
* pages - though CSS or JS added this way will be present on a cached page. * pages - though CSS or JS added this way will be present on a cached page.
*
* @return
* None.
*/ */
function hook_init() { function hook_init() {
drupal_add_css(drupal_get_path('module', 'book') . '/book.css'); drupal_add_css(drupal_get_path('module', 'book') . '/book.css');
@ -568,8 +555,6 @@ function hook_link($type, $object, $build_mode) {
* Nested array of links for the node keyed by providing module. * Nested array of links for the node keyed by providing module.
* @param $node * @param $node
* A node object that contains the links. * A node object that contains the links.
* @return
* None.
*/ */
function hook_link_alter(array &$links, $node) { function hook_link_alter(array &$links, $node) {
foreach ($links as $module => $link) { foreach ($links as $module => $link) {
@ -586,8 +571,6 @@ function hook_link_alter(array &$links, $node) {
* @param $account * @param $account
* A user object whose profile is being rendered. Profile items * A user object whose profile is being rendered. Profile items
* are stored in $account->content. * are stored in $account->content.
* @return
* None.
*/ */
function hook_profile_alter(&$account) { function hook_profile_alter(&$account) {
foreach ($account->content AS $key => $field) { foreach ($account->content AS $key => $field) {
@ -621,7 +604,7 @@ function hook_profile_alter(&$account) {
* either a custom address or the site-wide default email address. * either a custom address or the site-wide default email address.
* - 'headers' * - 'headers'
* Associative array containing mail headers, such as From, Sender, * Associative array containing mail headers, such as From, Sender,
* MIME-Version, Content-Type, etc. * MIME-Version, Content-Type, etc.
*/ */
function hook_mail_alter(&$message) { function hook_mail_alter(&$message) {
if ($message['mail_id'] == 'my_message') { if ($message['mail_id'] == 'my_message') {
@ -900,9 +883,6 @@ function hook_xmlrpc() {
* WATCHDOG_DEBUG Debug: debug-level messages * WATCHDOG_DEBUG Debug: debug-level messages
* - link: an optional link provided by the module that called the watchdog() function. * - link: an optional link provided by the module that called the watchdog() function.
* - message: The text of the message to be logged. * - message: The text of the message to be logged.
*
* @return
* None.
*/ */
function hook_watchdog(array $log_entry) { function hook_watchdog(array $log_entry) {
global $base_url, $language; global $base_url, $language;
@ -977,7 +957,7 @@ function hook_watchdog(array $log_entry) {
* array when the hook is invoked. * array when the hook is invoked.
* - 'from': * - 'from':
* The address the message will be marked as being from, which is * The address the message will be marked as being from, which is
* set by drupal_mail() to either a custom address or the site-wide * set by drupal_mail() to either a custom address or the site-wide
* default email address when the hook is invoked. * default email address when the hook is invoked.
* - 'headers': * - 'headers':
* Associative array containing mail headers, such as From, Sender, * Associative array containing mail headers, such as From, Sender,
@ -1033,8 +1013,6 @@ function hook_mail($key, &$message, $params) {
* *
* @see drupal_flush_all_caches() * @see drupal_flush_all_caches()
* *
* @param None.
*
* @return * @return
* An array of cache table names. * An array of cache table names.
*/ */
@ -1241,8 +1219,6 @@ function hook_file_validate(&$file) {
* *
* @param $file * @param $file
* The file that has just been created. * The file that has just been created.
* @return
* None.
* *
* @see file_save() * @see file_save()
*/ */
@ -1257,8 +1233,6 @@ function hook_file_insert(&$file) {
* *
* @param $file * @param $file
* The file that has just been updated. * The file that has just been updated.
* @return
* None.
* *
* @see file_save() * @see file_save()
*/ */
@ -1273,8 +1247,6 @@ function hook_file_update(&$file) {
* The newly copied file object. * The newly copied file object.
* @param $source * @param $source
* The original file before the copy. * The original file before the copy.
* @return
* None.
* *
* @see file_copy() * @see file_copy()
*/ */
@ -1289,8 +1261,6 @@ function hook_file_copy($file, $source) {
* The updated file object after the move. * The updated file object after the move.
* @param $source * @param $source
* The original file object before the move. * The original file object before the move.
* @return
* None.
* *
* @see file_move() * @see file_move()
*/ */
@ -1328,8 +1298,6 @@ function hook_file_references($file) {
* *
* @param $file * @param $file
* The file that has just been deleted. * The file that has just been deleted.
* @return
* None.
* *
* @see file_delete() * @see file_delete()
* @see upload_file_delete() * @see upload_file_delete()
@ -1547,8 +1515,6 @@ function hook_schema() {
* *
* @param $schema * @param $schema
* Nested array describing the schemas for all modules. * Nested array describing the schemas for all modules.
* @return
* None.
*/ */
function hook_schema_alter(&$schema) { function hook_schema_alter(&$schema) {
// Add field to existing schema. // Add field to existing schema.
@ -1572,8 +1538,6 @@ function hook_schema_alter(&$schema) {
* @see SelectQueryInterface * @see SelectQueryInterface
* @param $query * @param $query
* A Query object describing the composite parts of a SQL query. * A Query object describing the composite parts of a SQL query.
* @return
* None.
*/ */
function hook_query_alter(QueryAlterableInterface $query) { function hook_query_alter(QueryAlterableInterface $query) {
if ($query->hasTag('micro_limit')) { if ($query->hasTag('micro_limit')) {
@ -1591,8 +1555,6 @@ function hook_query_alter(QueryAlterableInterface $query) {
* *
* @param $query * @param $query
* An Query object describing the composite parts of a SQL query. * An Query object describing the composite parts of a SQL query.
* @return
* None.
*/ */
function hook_query_TAG_alter(QueryAlterableInterface $query) { function hook_query_TAG_alter(QueryAlterableInterface $query) {
// Skip the extra expensive alterations if site has no node access control modules. // Skip the extra expensive alterations if site has no node access control modules.